aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-02 14:43:08 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-02 15:07:00 -0800
commit12b9920a15d93ead97bad83c30fd3a15bc7b074a (patch)
tree7546b2b4945b8a41b8ef543b646701554c3f82ff /activerecord
parent9f0133fbf4465d97559d97ff04c67775b8379b1c (diff)
downloadrails-12b9920a15d93ead97bad83c30fd3a15bc7b074a.tar.gz
rails-12b9920a15d93ead97bad83c30fd3a15bc7b074a.tar.bz2
rails-12b9920a15d93ead97bad83c30fd3a15bc7b074a.zip
removing calls to deprecated methods
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/persistence.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index fad83cde09..9ac8fcb176 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -251,7 +251,8 @@ module ActiveRecord
attributes_with_values = arel_attributes_values(false, false, attribute_names)
return 0 if attributes_with_values.empty?
klass = self.class
- klass.unscoped.where(klass.arel_table[klass.primary_key].eq(id)).arel.update(attributes_with_values)
+ stmt = klass.unscoped.where(klass.arel_table[klass.primary_key].eq(id)).arel.compile_update(attributes_with_values)
+ klass.connection.update stmt.to_sql
end
# Creates a record with values matching those of the instance attributes