Commit 7839aa55 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use Arel to avoid MySQL triple quoting

parent 5747b0d3
...@@ -59,8 +59,7 @@ module ActiveRecord ...@@ -59,8 +59,7 @@ module ActiveRecord
return super unless locking_enabled? return super unless locking_enabled?
column_name = self.class.locking_column column_name = self.class.locking_column
table_name = self.class.quoted_table_name super.where(self.class.arel_table[column_name].eq(self[column_name]))
super.where("#{table_name}.#{column_name}" => self[column_name])
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment