aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-09-04 17:35:12 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-09-04 17:35:12 -0600
commit3f24fa338ffb63e3f25d1c72f0dc65665fd97cec (patch)
treea37ebccece492962a5da85cea06f55c4fabbbf78 /activerecord
parent21ffef38a5dc5a6a21f7e841aecab5b51f4fd185 (diff)
parentc431f1754b4329b972ce2e715df0e33aeaee7d30 (diff)
downloadrails-3f24fa338ffb63e3f25d1c72f0dc65665fd97cec.tar.gz
rails-3f24fa338ffb63e3f25d1c72f0dc65665fd97cec.tar.bz2
rails-3f24fa338ffb63e3f25d1c72f0dc65665fd97cec.zip
Merge pull request #21504 from ioquatix/patch-1
#where fails if opts.responds_to?(:==) unexpectedly
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 706c99c245..e25b889851 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -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