Fix rubocop offenses - Requires Ruby 3.1+
This commit is contained in:
@ -115,16 +115,16 @@ class ApplicationController < ActionController::Base
|
||||
redirect_back fallback_location: :root, allow_other_host: false, alert: message
|
||||
end
|
||||
end
|
||||
format.json { render json: {error: message}, status: status }
|
||||
format.json { render json: {error: message}, status: }
|
||||
end
|
||||
end
|
||||
private :render_error
|
||||
|
||||
def switch_locale(&action)
|
||||
def switch_locale(&)
|
||||
session[:locale] = sanitize_locale(params[:custom_locale] || params[:locale] || session[:locale])
|
||||
locale = session[:locale] || I18n.default_locale
|
||||
Sentry.set_extras(locale: locale)
|
||||
I18n.with_locale(locale, &action)
|
||||
Sentry.set_extras(locale:)
|
||||
I18n.with_locale(locale, &)
|
||||
end
|
||||
private :switch_locale
|
||||
|
||||
|
Reference in New Issue
Block a user