instance method
from_hash
Ruby on Rails 8.1.2
Since v8.0.4Available in: v8.0.4 v8.1.2
Signature
from_hash(hash, encoding_template: nil)
No documentation comment.
Parameters
-
hashreq -
encoding_templatekey = nil
Source
# File actionpack/lib/action_dispatch/http/param_builder.rb, line 62
def from_hash(hash, encoding_template: nil)
# Force encodings from encoding template
hash = Request::Utils::CustomParamEncoder.encode_for_template(hash, encoding_template)
# Assert valid encoding
Request::Utils.check_param_encoding(hash)
# Convert hashes to HWIA (or UploadedFile), and deep-munge nils
# out of arrays
hash = Request::Utils.normalize_encode_params(hash)
hash
end
Defined in actionpack/lib/action_dispatch/http/param_builder.rb line 62
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ParamBuilder