diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-20 18:40:19 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-20 19:01:26 +0530 |
commit | 8b9bfbe225a59ccefa46f1e8bf301bc483bef0e0 (patch) | |
tree | 023c1c237bf65da35ebaccc3db843587b1052e69 /activerecord/lib/active_record/locking | |
parent | f216fadc0e4a54d1807fe5a9462f7bd34e9024b0 (diff) | |
download | rails-8b9bfbe225a59ccefa46f1e8bf301bc483bef0e0.tar.gz rails-8b9bfbe225a59ccefa46f1e8bf301bc483bef0e0.tar.bz2 rails-8b9bfbe225a59ccefa46f1e8bf301bc483bef0e0.zip |
Dont delegate Relation#update to arel
Diffstat (limited to 'activerecord/lib/active_record/locking')
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index bf0683eb8f..9044ca418b 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -84,7 +84,7 @@ module ActiveRecord relation.table[self.class.primary_key].eq(quoted_id).and( relation.table[self.class.locking_column].eq(quote_value(previous_value)) ) - ).update(arel_attributes_values(false, false, attribute_names)) + ).arel.update(arel_attributes_values(false, false, attribute_names)) unless affected_rows == 1 |