提交 957e6fbe 编写于 作者: A Aaron Patterson

dry up calls to arel.join()

上级 ef2392f6
......@@ -159,14 +159,13 @@ def custom_join_sql(*joins)
case join
when Hash, Array, Symbol
if array_of_strings?(join)
join_string = join.join(' ')
arel.join(Arel::SqlLiteral.new(join_string))
join = Arel::SqlLiteral.new(join.join(' '))
end
when String
arel.join(Arel::SqlLiteral.new(join))
else
arel.join(join)
join = Arel::SqlLiteral.new(join)
end
arel.join(join)
end
arel.joins(arel)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册