aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-27 14:29:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-27 14:29:07 -0700
commitf22b40a8f223e0b2f5194b6f3ce24cafd5cd3a05 (patch)
tree145afc626c9b5cebe2cd820de069a25742535417 /activerecord/lib/active_record
parentbfc986811c5cbcfcc856916a1b09fcbf6551ecf5 (diff)
downloadrails-f22b40a8f223e0b2f5194b6f3ce24cafd5cd3a05.tar.gz
rails-f22b40a8f223e0b2f5194b6f3ce24cafd5cd3a05.tar.bz2
rails-f22b40a8f223e0b2f5194b6f3ce24cafd5cd3a05.zip
make sure we use the engine assigned to the table when quoting
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
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