diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-17 14:08:12 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-17 14:08:12 -0700 |
commit | 89448a7f5c21729568eaa12250447f313197a30d (patch) | |
tree | 97da227a52022521c0963c3439df961f357c8f2a /guides/source/getting_started.md | |
parent | cb3f25593b1137e344086364d4b1a52c08e8eb3b (diff) | |
download | rails-89448a7f5c21729568eaa12250447f313197a30d.tar.gz rails-89448a7f5c21729568eaa12250447f313197a30d.tar.bz2 rails-89448a7f5c21729568eaa12250447f313197a30d.zip |
remove useless conditionals
`element` can never be a hash because:
1. `slice` returns a Parameters object and calls each on it: https://github.com/rails/rails/blob/cb3f25593b1137e344086364d4b1a52c08e8eb3b/actionpack/lib/action_controller/metal/strong_parameters.rb#L656
2. `each` which is implemented by `each_pair` will call `convert_hashes_to_parameters` on the value: https://github.com/rails/rails/blob/cb3f25593b1137e344086364d4b1a52c08e8eb3b/actionpack/lib/action_controller/metal/strong_parameters.rb#L192-197
3. `convert_hashes_to_parameters` will convert any hash objects in to parameters objects: https://github.com/rails/rails/blob/cb3f25593b1137e344086364d4b1a52c08e8eb3b/actionpack/lib/action_controller/metal/strong_parameters.rb#L550-566
Diffstat (limited to 'guides/source/getting_started.md')
0 files changed, 0 insertions, 0 deletions