Flowdock
method

assigns

Importance_0
v3.0.0 - Show latest stable - 0 notes - Class: ActionDispatch::TestProcess
assigns(key = nil) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 6
    def assigns(key = nil)
      assigns = {}.with_indifferent_access
      @controller.instance_variable_names.each do |ivar|
        next if ActionController::Base.protected_instance_variables.include?(ivar)
        assigns[ivar[1..-1]] = @controller.instance_variable_get(ivar)
      end

      key.nil? ? assigns : assigns[key]
    end
Register or log in to add new notes.