This method is deprecated or moved on the latest stable version.
The last existing version (v2.2.1) is shown here.
bind(key, value)
private
Bind a key (which may be nil for items in an array) to the provided value.
# File actionpack/lib/action_controller/request.rb, line 808
def bind(key, value)
if top.is_a? Array
if key
if top[-1].is_a?(Hash) && ! top[-1].key?(key)
top[-1][key] = value
else
top << {key => value}.with_indifferent_access
push top.last
value = top[key]
end
else
top << value
end
elsif top.is_a? Hash
key = CGI.unescape(key)
parent << (@top = {}) if top.key?(key) && parent.is_a?(Array)
top[key] ||= value
return top[key]
else
raise ArgumentError, "Don't know what to do: top is #{top.inspect}"
end
return value
end