Simplify render in controllers (#2144)
This commit is contained in:
@ -18,7 +18,7 @@ class Settings::ImportsController < ApplicationController
|
||||
ImportWorker.perform_async(@import.id)
|
||||
redirect_to settings_import_path, notice: I18n.t('imports.success')
|
||||
else
|
||||
render action: :show
|
||||
render :show
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -29,7 +29,7 @@ class Settings::PreferencesController < ApplicationController
|
||||
if current_user.update(user_params.except(:notification_emails, :interactions, :setting_default_privacy, :setting_boost_modal, :setting_auto_play_gif))
|
||||
redirect_to settings_preferences_path, notice: I18n.t('generic.changes_saved_msg')
|
||||
else
|
||||
render action: :show
|
||||
render :show
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -17,7 +17,7 @@ class Settings::ProfilesController < ApplicationController
|
||||
if @account.update(account_params)
|
||||
redirect_to settings_profile_path, notice: I18n.t('generic.changes_saved_msg')
|
||||
else
|
||||
render action: :show
|
||||
render :show
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -26,7 +26,7 @@ class Settings::TwoFactorAuthsController < ApplicationController
|
||||
@confirmation = Form::TwoFactorConfirmation.new
|
||||
set_qr_code
|
||||
flash.now[:alert] = I18n.t('two_factor_auth.wrong_code')
|
||||
render action: :new
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user