diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-28 17:12:02 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-28 17:12:19 -0700 |
commit | b50b1ef9e8ea33c8fb3fa1cac915baca64edfbea (patch) | |
tree | 171f295946a6c7601ac21ac38ea1e8f5b37bbd9e /activerecord/lib/active_record/relation | |
parent | 39d98e5c0925f6ba00e8a6d0058b3230ee76f6d2 (diff) | |
download | rails-b50b1ef9e8ea33c8fb3fa1cac915baca64edfbea.tar.gz rails-b50b1ef9e8ea33c8fb3fa1cac915baca64edfbea.tar.bz2 rails-b50b1ef9e8ea33c8fb3fa1cac915baca64edfbea.zip |
shorten up or sql literal creation statements
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index e99009a111..762ae8e2a4 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -158,11 +158,9 @@ module ActiveRecord case join when Array - if array_of_strings?(join) - join = Arel::SqlLiteral.new(join.join(' ')) - end + join = Arel.sql(join.join(' ')) if array_of_strings?(join) when String - join = Arel::SqlLiteral.new(join) + join = Arel.sql(join) end arel.join(join) |