mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
Use Hash#each_key instead of Hash#keys.each
Hash#keys.each allocates an array of keys. Hash#each_key iterates through the keys without allocating a new array and as such is a better, more specific tool for the job.
This commit is contained in:
parent
e2fcff3b13
commit
ee571fe9a2
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ module Ransack
|
|||
end
|
||||
|
||||
def collapse_multiparameter_attributes!(attrs)
|
||||
attrs.keys.each do |k|
|
||||
attrs.each_key do |k|
|
||||
if k.include?(Constants::LEFT_PARENTHESIS)
|
||||
real_attribute, position = k.split(/\(|\)/)
|
||||
cast =
|
||||
|
|
Loading…
Reference in a new issue