aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/locking/optimistic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/locking/optimistic.rb')
-rw-r--r--activerecord/lib/active_record/locking/optimistic.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb
index bc22c2a511..4e833ec871 100644
--- a/activerecord/lib/active_record/locking/optimistic.rb
+++ b/activerecord/lib/active_record/locking/optimistic.rb
@@ -89,7 +89,7 @@ module ActiveRecord
attribute_names.uniq!
begin
- affected_rows = arel_table.where(
+ affected_rows = arel_table(true).where(
arel_table[self.class.primary_key].eq(quoted_id).and(
arel_table[self.class.locking_column].eq(quote_value(previous_value))
)
@@ -116,7 +116,7 @@ module ActiveRecord
lock_col = self.class.locking_column
previous_value = send(lock_col).to_i
- affected_rows = arel_table.where(
+ affected_rows = arel_table(true).where(
arel_table[self.class.primary_key].eq(quoted_id).and(
arel_table[self.class.locking_column].eq(quote_value(previous_value))
)