mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #5461 from yakko/master
relation .present? and .blank? should not query SELECT COUNT(DISTINCT id)
This commit is contained in:
commit
fa7a3aaac7
1 changed files with 4 additions and 0 deletions
|
@ -507,6 +507,10 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
def blank?
|
||||
to_a.blank?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def references_eager_loaded_tables?
|
||||
|
|
Loading…
Reference in a new issue