Remove instance variables from helper usage (#24203)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2023-04-23 22:35:54 +02:00
1 parent e1b4eeb636
commit 0a5f0a8b20
19 files changed
+53 -45

No files matched your search

@@ -19,6 +19,7 @@ class ApplicationController < ActionController::Base
helper_method :omniauth_only?
helper_method :sso_account_settings
helper_method :whitelist_mode?
helper_method :body_class_string
rescue_from ActionController::ParameterMissing, Paperclip::AdapterRegistry::NoHandlerError, with: :bad_request
rescue_from Mastodon::NotPermittedError, with: :forbidden
@@ -148,6 +149,10 @@ class ApplicationController < ActionController::Base
current_user.setting_theme
end
def body_class_string
@body_classes || ''
end
def respond_with_error(code)
respond_to do |format|
format.any { render "errors/#{code}", layout: 'error', status: code, formats: [:html] }