mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #10767 from jmondo/master
Use grep instead of select with === in QueryMethods
This commit is contained in:
commit
c2f3efffd9
1 changed files with 1 additions and 1 deletions
|
@ -1010,7 +1010,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def validate_order_args(args)
|
||||
args.select { |a| Hash === a }.each do |h|
|
||||
args.grep(Hash) do |h|
|
||||
unless (h.values - [:asc, :desc]).empty?
|
||||
raise ArgumentError, 'Direction should be :asc or :desc'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue