1
0
Fork 0
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:
Gaurish Sharma 2016-03-12 13:33:08 +05:30
parent 598816f630
commit 8b44687e9e

View file

@ -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