instance method
paramify_values
Ruby on Rails 4.0.13
Since v3.1.12 Last seen in v4.2.9Signature
paramify_values(hash_or_array_or_value)
No documentation comment.
Parameters
-
hash_or_array_or_valuereq
Source
# File actionpack/lib/action_controller/test_case.rb, line 515
def paramify_values(hash_or_array_or_value)
case hash_or_array_or_value
when Hash
Hash[hash_or_array_or_value.map{|key, value| [key, paramify_values(value)] }]
when Array
hash_or_array_or_value.map {|i| paramify_values(i)}
when Rack::Test::UploadedFile, ActionDispatch::Http::UploadedFile
hash_or_array_or_value
else
hash_or_array_or_value.to_param
end
end
Defined in actionpack/lib/action_controller/test_case.rb line 515
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::TestCase::Behavior