mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
"subhash" --> "sub-hash"
This commit is contained in:
parent
5f72fc6af8
commit
fe8a6ba3a1
3 changed files with 4 additions and 4 deletions
|
@ -6,8 +6,8 @@ module ActionDispatch
|
|||
module Http
|
||||
# Allows you to specify sensitive parameters which will be replaced from
|
||||
# the request log by looking in the query string of the request and all
|
||||
# subhashes of the params hash to filter. If a block is given, each key and
|
||||
# value of the params hash and all subhashes is passed to it, the value
|
||||
# sub-hashes of the params hash to filter. If a block is given, each key and
|
||||
# value of the params hash and all sub-hashes is passed to it, the value
|
||||
# or key can be replaced using String#replace or similar method.
|
||||
#
|
||||
# env["action_dispatch.parameter_filter"] = [:password]
|
||||
|
|
|
@ -635,7 +635,7 @@ class HashExtTest < ActiveSupport::TestCase
|
|||
assert_equal 1, h['first']
|
||||
end
|
||||
|
||||
def test_indifferent_subhashes
|
||||
def test_indifferent_sub_hashes
|
||||
h = {'user' => {'id' => 5}}.with_indifferent_access
|
||||
['user', :user].each {|user| [:id, 'id'].each {|id| assert_equal 5, h[user][id], "h[#{user.inspect}][#{id.inspect}] should be 5"}}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ used:
|
|||
params.require(:log_entry).permit!
|
||||
```
|
||||
|
||||
This will mark the `:log_entry` parameters hash and any subhash of it
|
||||
This will mark the `:log_entry` parameters hash and any sub-hash of it
|
||||
permitted. Extreme care should be taken when using `permit!` as it
|
||||
will allow all current and future model attributes to be
|
||||
mass-assigned.
|
||||
|
|
Loading…
Reference in a new issue