mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
unless Array#empty? is faster than if Array#present?
This commit is contained in:
@@ -217,7 +217,7 @@ module ActiveRecord
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user