提交 2b8f2499 编写于 作者: A Aaron Patterson

unless Array#empty? is faster than if Array#present?

上级 3c11e926
......@@ -217,7 +217,7 @@ def build_joins(relation, joins)
end
def build_select(arel, selects)
if selects.present?
unless selects.empty?
@implicit_readonly = false
# TODO: fix this ugly hack, we should refactor the callers to get an ARel compatible array.
# Before this change we were passing to ARel the last element only, and ARel is capable of handling an array
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册