diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-12 14:32:14 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-12 14:33:16 -0700 |
commit | 603406dc53b656f7f317fe2ac6c4bac616a86368 (patch) | |
tree | 053c4aa76511684e3e65c5016d886096aa16294c /activerecord/lib | |
parent | 879cac5d76d0d491c97941b9c0f84869a8988dae (diff) | |
download | rails-603406dc53b656f7f317fe2ac6c4bac616a86368.tar.gz rails-603406dc53b656f7f317fe2ac6c4bac616a86368.tar.bz2 rails-603406dc53b656f7f317fe2ac6c4bac616a86368.zip |
stop using deprecated arel API
Diffstat (limited to 'activerecord/lib')
-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 ede1c8821e..e950dce62b 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -291,8 +291,8 @@ module ActiveRecord record = where(primary_key.eq(id)).first unless record - conditions = arel.wheres.map { |x| x.value }.join(', ') - conditions = " [WHERE #{conditions}]" if conditions.present? + conditions = arel.where_sql + conditions = " [#{conditions}]" if conditions raise RecordNotFound, "Couldn't find #{@klass.name} with ID=#{id}#{conditions}" end |