instance method
view_assigns
Ruby on Rails 3.1.12
Since v3.0.20 PrivateSignature
view_assigns()
Returns a Hash of instance variables and their values, as defined by the user in the test case, which are then assigned to the view being rendered. This is generally intended for internal use and extension frameworks.
Source
# File actionpack/lib/action_view/test_case.rb, line 215
def view_assigns
Hash[_user_defined_ivars.map do |var|
[var[1, var.length].to_sym, instance_variable_get(var)]
end]
end
Defined in actionpack/lib/action_view/test_case.rb line 215
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::TestCase::Behavior