mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add example for ActionController::Parameters#to_unsafe_h
[ci-skip]
This commit is contained in:
parent
598816f630
commit
8b44687e9e
1 changed files with 7 additions and 0 deletions
|
@ -184,6 +184,13 @@ module ActionController
|
|||
# Returns an unsafe, unfiltered
|
||||
# <tt>ActiveSupport::HashWithIndifferentAccess</tt> representation of this
|
||||
# parameter.
|
||||
#
|
||||
# params = ActionController::Parameters.new({
|
||||
# name: 'Senjougahara Hitagi',
|
||||
# oddity: 'Heavy stone crab'
|
||||
# })
|
||||
# params.to_unsafe_h
|
||||
# # => {"name"=>"Senjougahara Hitagi", oddity" => "Heavy stone crab"}
|
||||
def to_unsafe_h
|
||||
convert_parameters_to_hashes(@parameters, :to_unsafe_h)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue