Make _protected_ivars private

This method is only used internally and it being public it was being
retorned in the `action_methods` list.
This commit is contained in:
Rafael Mendonça França 2020-04-07 12:40:11 -04:00
parent e1402f47b9
commit f1a2c021e3
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
3 changed files with 7 additions and 6 deletions

@ -455,10 +455,6 @@ class Base < AbstractController::Base
PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + [:@_action_has_layout]
def _protected_ivars # :nodoc:
PROTECTED_IVARS
end
helper ActionMailer::MailHelper
class_attribute :delivery_job, default: ::ActionMailer::DeliveryJob
@ -1030,6 +1026,10 @@ def instrument_name
"action_mailer"
end
def _protected_ivars
PROTECTED_IVARS
end
ActiveSupport.run_load_hooks(:action_mailer, self)
end
end

@ -120,7 +120,7 @@ def _normalize_render(*args, &block) # :nodoc:
options
end
def _protected_ivars # :nodoc:
def _protected_ivars
DEFAULT_PROTECTED_INSTANCE_VARIABLES
end
end

@ -263,9 +263,10 @@ def self.without_modules(*modules)
@_view_renderer @_lookup_context @_routes @_view_runtime @_db_runtime @_helper_proxy
)
def _protected_ivars # :nodoc:
def _protected_ivars
PROTECTED_IVARS
end
private :_protected_ivars
ActiveSupport.run_load_hooks(:action_controller_base, self)
ActiveSupport.run_load_hooks(:action_controller, self)