mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #26394 from kamipo/remove_redundant_condition
Remove redundant `!loaded?` condition
This commit is contained in:
commit
38fae35d53
1 changed files with 2 additions and 2 deletions
|
@ -227,9 +227,9 @@ module ActiveRecord
|
|||
else
|
||||
target.size
|
||||
end
|
||||
elsif !loaded? && !association_scope.group_values.empty?
|
||||
elsif !association_scope.group_values.empty?
|
||||
load_target.size
|
||||
elsif !loaded? && !association_scope.distinct_value && target.is_a?(Array)
|
||||
elsif !association_scope.distinct_value && target.is_a?(Array)
|
||||
unsaved_records = target.select(&:new_record?)
|
||||
unsaved_records.size + count_records
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue