mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Move protected instance variable to the right place
There were a lot of protected instance variables in AbsctractController::Rendering that were related to Action Controller and Action View. Moving to ActionController::Base's protected instance list we make it closer to where they are really defined.
This commit is contained in:
parent
19ba522b90
commit
cece50d3a6
2 changed files with 5 additions and 6 deletions
|
@ -60,9 +60,7 @@ module AbstractController
|
|||
end
|
||||
|
||||
DEFAULT_PROTECTED_INSTANCE_VARIABLES = Set.new %i(
|
||||
@_action_name @_response_body @_formats @_prefixes @_config
|
||||
@_view_context_class @_view_renderer @_lookup_context
|
||||
@_routes @_db_runtime
|
||||
@_action_name @_response_body @_formats @_prefixes
|
||||
)
|
||||
|
||||
# This method should return a hash with assigns.
|
||||
|
|
|
@ -251,9 +251,10 @@ module ActionController
|
|||
setup_renderer!
|
||||
|
||||
# Define some internal variables that should not be propagated to the view.
|
||||
PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + [
|
||||
:@_params, :@_response, :@_request,
|
||||
:@_view_runtime, :@_stream, :@_url_options, :@_action_has_layout ]
|
||||
PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + %i(
|
||||
@_params @_response @_request @_config @_url_options @_action_has_layout @_view_context_class
|
||||
@_view_renderer @_lookup_context @_routes @_view_runtime @_db_runtime
|
||||
)
|
||||
|
||||
def _protected_ivars # :nodoc:
|
||||
PROTECTED_IVARS
|
||||
|
|
Loading…
Reference in a new issue