aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-19 23:11:54 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-19 23:11:54 +0530
commit9acf0af544f2f5dcaf257bdc25047017c972ffce (patch)
treeb43c0c62af736237fa4d328cbc3e038155801ea6 /activerecord/lib/active_record/relation
parentdbce07b81d24a991ddd29b91f9c358b1f236bda2 (diff)
downloadrails-9acf0af544f2f5dcaf257bdc25047017c972ffce.tar.gz
rails-9acf0af544f2f5dcaf257bdc25047017c972ffce.tar.bz2
rails-9acf0af544f2f5dcaf257bdc25047017c972ffce.zip
Remove Relation#where_clause
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 85ae3d11bb..90ca002c76 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -128,7 +128,7 @@ module ActiveRecord
record = where(primary_key.eq(id)).first
unless record
- conditions = where_clause(', ')
+ conditions = arel.send(:where_clauses).join(', ')
conditions = " [WHERE #{conditions}]" if conditions.present?
raise RecordNotFound, "Couldn't find #{@klass.name} with ID=#{id}#{conditions}"
end
@@ -154,7 +154,7 @@ module ActiveRecord
if result.size == expected_size
result
else
- conditions = where_clause(', ')
+ conditions = arel.send(:where_clauses).join(', ')
conditions = " [WHERE #{conditions}]" if conditions.present?
error = "Couldn't find all #{@klass.name.pluralize} with IDs "