instance method
view_assigns
Ruby on Rails 7.1.6
Since v3.0.20Signature
view_assigns()
This method should return a hash with assigns. You can overwrite this configuration per controller.
Source
# File actionpack/lib/abstract_controller/rendering.rb, line 61
def view_assigns
variables = instance_variables - _protected_ivars
variables.each_with_object({}) do |name, hash|
hash[name.slice(1, name.length)] = instance_variable_get(name)
end
end
Defined in actionpack/lib/abstract_controller/rendering.rb line 61
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Rendering