summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/initializers/ar_monkey_patch.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/config/initializers/ar_monkey_patch.rb b/config/initializers/ar_monkey_patch.rb
index 5506873344f..6979f4641b0 100644
--- a/config/initializers/ar_monkey_patch.rb
+++ b/config/initializers/ar_monkey_patch.rb
@@ -59,8 +59,7 @@ module ActiveRecord
return super unless locking_enabled?
column_name = self.class.locking_column
- table_name = self.class.quoted_table_name
- super.where("#{table_name}.#{column_name}" => self[column_name])
+ super.where(self.class.arel_table[column_name].eq(self[column_name]))
end
end