diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-23 13:57:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-23 13:57:22 -0700 |
commit | 5931a1dbd3d067d9d4cb33b0344a9a7931bb681b (patch) | |
tree | 99666bfb25e3863341ea4c0ca34ba5cf93fa03c8 /activerecord | |
parent | ee9e1570befe6e624264d137a442745efd1f147d (diff) | |
download | rails-5931a1dbd3d067d9d4cb33b0344a9a7931bb681b.tar.gz rails-5931a1dbd3d067d9d4cb33b0344a9a7931bb681b.tar.bz2 rails-5931a1dbd3d067d9d4cb33b0344a9a7931bb681b.zip |
sql literal strings should be marked as sql literal strings
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 0b5e9b4fb2..8ccc62c9d1 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -121,8 +121,10 @@ module ActiveRecord when Hash, Array, Symbol if array_of_strings?(join) join_string = join.join(' ') - arel = arel.join(join_string) + arel = arel.join(Arel::SqlLiteral.new(join_string)) end + when String + arel = arel.join(Arel::SqlLiteral.new(join)) else arel = arel.join(join) end |