提交 068a436f 编写于 作者: R Ryuta Kamizono

Remove redundant `blank?` check and `compact_blank!` for `joins_values`

`joins_values` is already `compact_blank!`ed, so `blank?` check is
entirely redundant.
上级 35813645
......@@ -1185,13 +1185,9 @@ def build_join_buckets
stashed_eager_load = joins.pop if joins.last.base_klass == klass
end
joins.map! do |join|
if join.is_a?(String)
table.create_string_join(Arel.sql(join.strip)) unless join.blank?
else
join
end
end.compact_blank!.uniq!
joins.each_with_index do |join, i|
joins[i] = table.create_string_join(Arel.sql(join.strip)) if join.is_a?(String)
end
while joins.first.is_a?(Arel::Nodes::Join)
join_node = joins.shift
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册