Merge pull request #21504 from ioquatix/patch-1
#where fails if opts.responds_to?(:==) unexpectedly
This commit is contained in:
commit
3f24fa338f
@ -548,7 +548,7 @@ def joins!(*args) # :nodoc:
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user