diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-30 15:04:08 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-30 15:04:08 -0500 |
commit | c353794dff580c8aa63b357b2857c1fadff3104b (patch) | |
tree | b57794919c8eabd9d928b44a15342784f4b4215b /activerecord/lib | |
parent | 5cef8bcc549bf714c1c73e658fd96d5fea0fab84 (diff) | |
download | rails-c353794dff580c8aa63b357b2857c1fadff3104b.tar.gz rails-c353794dff580c8aa63b357b2857c1fadff3104b.tar.bz2 rails-c353794dff580c8aa63b357b2857c1fadff3104b.zip |
Fixed that pessimistic locking you reference the quoted table name (Josh Susser) [#67 state:resolved]
Diffstat (limited to 'activerecord/lib')
-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 f2c2c5f070..65f88cfdc7 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -78,7 +78,7 @@ module ActiveRecord begin affected_rows = connection.update(<<-end_sql, "#{self.class.name} Update with optimistic locking") - UPDATE #{self.class.table_name} + UPDATE #{self.class.quoted_table_name} SET #{quoted_comma_pair_list(connection, attributes_with_quotes(false, false, attribute_names))} WHERE #{self.class.primary_key} = #{quote_value(id)} AND #{self.class.quoted_locking_column} = #{quote_value(previous_value)} |