diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index f20d143567fdcfebad8cc4654fed182857e75967..61bcfc5a2f477712e00bb40f01df9b26c69654db 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -56,19 +56,15 @@ def rendered_format Mime[:text] end - DEFAULT_PROTECTED_INSTANCE_VARIABLES = Set.new %i( - @_action_name @_response_body @_formats @_prefixes - ) + DEFAULT_PROTECTED_INSTANCE_VARIABLES = %i(@_action_name @_response_body @_formats @_prefixes) # This method should return a hash with assigns. # You can overwrite this configuration per controller. def view_assigns - protected_vars = _protected_ivars + variables = instance_variables - _protected_ivars - instance_variables.each_with_object({}) do |name, hash| - unless protected_vars.include?(name) - hash[name.slice(1, name.length)] = instance_variable_get(name) - end + variables.each_with_object({}) do |name, hash| + hash[name.slice(1, name.length)] = instance_variable_get(name) end end