diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-11 11:24:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-11 11:43:57 -0700 |
commit | 3c11e92616c3934a2f82d7a570ea969877ec1a13 (patch) | |
tree | a05822780c65eca272e3d6ef50c70ba00e5a0611 | |
parent | 25f1e015c0a89a11a679cda6e2fab70b54612f65 (diff) | |
download | rails-3c11e92616c3934a2f82d7a570ea969877ec1a13.tar.gz rails-3c11e92616c3934a2f82d7a570ea969877ec1a13.tar.bz2 rails-3c11e92616c3934a2f82d7a570ea969877ec1a13.zip |
stop using private methods
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 4 |
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 b34c11973b..0c75acf723 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -291,7 +291,7 @@ module ActiveRecord record = where(primary_key.eq(id)).first unless record - conditions = arel.send(:where_clauses).join(', ') + conditions = arel.wheres.map { |x| x.value }.join(', ') conditions = " [WHERE #{conditions}]" if conditions.present? raise RecordNotFound, "Couldn't find #{@klass.name} with ID=#{id}#{conditions}" end @@ -317,7 +317,7 @@ module ActiveRecord if result.size == expected_size result else - conditions = arel.send(:where_clauses).join(', ') + conditions = arel.wheres.map { |x| x.value }.join(', ') conditions = " [WHERE #{conditions}]" if conditions.present? error = "Couldn't find all #{@klass.name.pluralize} with IDs " |