diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index c97b1a24d2..b8cfdb54e5 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -182,7 +182,7 @@ module ActiveRecord when Arel::SqlLiteral arel = arel.where(where) else - sql = where.is_a?(String) ? where : where.to_sql + sql = where.is_a?(String) ? where : where.to_sql(table.engine) arel = arel.where(Arel::SqlLiteral.new("(#{sql})")) end end |