1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #21504 from ioquatix/patch-1

#where fails if opts.responds_to?(:==) unexpectedly
This commit is contained in:
Sean Griffin 2015-09-04 17:35:12 -06:00
commit 3f24fa338f

View file

@ -548,7 +548,7 @@ module ActiveRecord
# If the condition is any blank-ish object, then #where is a no-op and returns
# the current relation.
def where(opts = :chain, *rest)
if opts == :chain
if :chain == opts
WhereChain.new(spawn)
elsif opts.blank?
self