diff options
author | Christopher Meiklejohn <christopher.meiklejohn@gmail.com> | 2011-03-14 22:19:47 -0400 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-05-08 18:37:28 +0100 |
commit | 4fbd8adf4824d48aea47a57047d90fb6510cee28 (patch) | |
tree | 6db7a372616d0299d840bb632dfe132e730d919d /activerecord/lib/active_record | |
parent | a45f300e5f2d6b6581dd0f0d0f650c83b9773170 (diff) | |
download | rails-4fbd8adf4824d48aea47a57047d90fb6510cee28.tar.gz rails-4fbd8adf4824d48aea47a57047d90fb6510cee28.tar.bz2 rails-4fbd8adf4824d48aea47a57047d90fb6510cee28.zip |
Don't quote ID's as Arel will quote them -- follow same conventions as the delete method.
Diffstat (limited to 'activerecord/lib/active_record')
-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 9a31675782..cdedcde0eb 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -94,7 +94,7 @@ module ActiveRecord relation = self.class.unscoped stmt = relation.where( - relation.table[self.class.primary_key].eq(quoted_id).and( + relation.table[self.class.primary_key].eq(id).and( relation.table[lock_col].eq(quote_value(previous_lock_value)) ) ).arel.compile_update(arel_attributes_values(false, false, attribute_names)) |