Fix most rubocop issues (#2165)
* Run rubocop --autocorrect on app/, config/ and lib/, also manually fix some remaining style issues * Run rubocop --autocorrect-all on db/ * Run rubocop --autocorrect-all on `spec/` and fix remaining issues
This commit is contained in:
@ -40,7 +40,7 @@ class Api::V1::Timelines::PublicController < Api::BaseController
|
||||
only_media: truthy_param?(:only_media),
|
||||
allow_local_only: truthy_param?(:allow_local_only),
|
||||
with_replies: Setting.show_replies_in_public_timelines,
|
||||
with_reblogs: Setting.show_reblogs_in_public_timelines,
|
||||
with_reblogs: Setting.show_reblogs_in_public_timelines
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -15,12 +15,6 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||
|
||||
skip_before_action :require_functional!
|
||||
|
||||
def new
|
||||
super
|
||||
|
||||
resource.email = current_user.unconfirmed_email || current_user.email if user_signed_in?
|
||||
end
|
||||
|
||||
def show
|
||||
old_session_values = session.to_hash
|
||||
reset_session
|
||||
@ -29,6 +23,12 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||
super
|
||||
end
|
||||
|
||||
def new
|
||||
super
|
||||
|
||||
resource.email = current_user.unconfirmed_email || current_user.email if user_signed_in?
|
||||
end
|
||||
|
||||
def confirm_captcha
|
||||
check_captcha! do |message|
|
||||
flash.now[:alert] = message
|
||||
@ -51,6 +51,7 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||
# step.
|
||||
confirmation_token = params[:confirmation_token]
|
||||
return if confirmation_token.nil?
|
||||
|
||||
@confirmation_user = User.find_first_by_auth_conditions(confirmation_token: confirmation_token)
|
||||
end
|
||||
|
||||
|
@ -12,9 +12,7 @@ class Settings::FlavoursController < Settings::BaseController
|
||||
end
|
||||
|
||||
def show
|
||||
unless Themes.instance.flavours.include?(params[:flavour]) || (params[:flavour] == current_flavour)
|
||||
redirect_to action: 'show', flavour: current_flavour
|
||||
end
|
||||
redirect_to action: 'show', flavour: current_flavour unless Themes.instance.flavours.include?(params[:flavour]) || (params[:flavour] == current_flavour)
|
||||
|
||||
@listing = Themes.instance.flavours
|
||||
@selected = params[:flavour]
|
||||
|
Reference in New Issue
Block a user