diff options
author | Boris Slobodin <boris@slobodin.ca> | 2017-04-09 16:05:13 -0700 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-04-10 08:35:13 +0930 |
commit | 24ac36be7150f97ac0a61cf7cbe7d212097ef1a6 (patch) | |
tree | e65092482c242de44b44cf2f5acc7f17c6070919 /activerecord/lib/active_record | |
parent | ee0f5c3f592be86fa80b0bde9aeb5a351a1f1df0 (diff) | |
download | rails-24ac36be7150f97ac0a61cf7cbe7d212097ef1a6.tar.gz rails-24ac36be7150f97ac0a61cf7cbe7d212097ef1a6.tar.bz2 rails-24ac36be7150f97ac0a61cf7cbe7d212097ef1a6.zip |
exclude ORDER BY clause for exists? (#28699)
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 14c2ddd85b..a1459c87c6 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -383,7 +383,7 @@ module ActiveRecord end def construct_relation_for_exists(relation, conditions) - relation = relation.except(:select, :distinct)._select!(ONE_AS_ONE).limit!(1) + relation = relation.except(:select, :distinct, :order)._select!(ONE_AS_ONE).limit!(1) case conditions when Array, Hash |