shorten up or sql literal creation statements

This commit is contained in:
Aaron Patterson
2010-09-28 17:12:02 -07:00
parent 39d98e5c09
commit b50b1ef9e8

View File

@@ -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)