aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2011-11-09 04:46:11 +0900
committerAkira Matsuda <ronnie@dio.jp>2011-11-09 04:51:11 +0900
commit74c6e80cabd8e3b7751fc3a32c9ad95c1780054b (patch)
tree515d82113e061b166d26cfc442f78634cbc512cb /activerecord/lib/active_record
parent5b21bfa84862807d62b297de76805de8afcee511 (diff)
downloadrails-74c6e80cabd8e3b7751fc3a32c9ad95c1780054b.tar.gz
rails-74c6e80cabd8e3b7751fc3a32c9ad95c1780054b.tar.bz2
rails-74c6e80cabd8e3b7751fc3a32c9ad95c1780054b.zip
exclude ORDER BY clause when querying Relation#exists?
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
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 7eeb3dde70..3c8e0f2052 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -191,7 +191,7 @@ module ActiveRecord
join_dependency = construct_join_dependency_for_association_find
relation = construct_relation_for_association_find(join_dependency)
- relation = relation.except(:select).select("1").limit(1)
+ relation = relation.except(:select, :order).select("1").limit(1)
case id
when Array, Hash