diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-10-27 09:18:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 09:18:36 +0900 |
commit | 27265ee57c9420e233c877c7280cb8df53e31e0a (patch) | |
tree | fe4a5a7c6253321e2da64d60c22a0bb673a7f1e8 /activerecord/lib/active_record/associations | |
parent | 12de5e202ddfca27cccc5965b3048e88718a9ace (diff) | |
parent | d95fbd7dba54cfbd282f808102dfdffa3499d669 (diff) | |
download | rails-27265ee57c9420e233c877c7280cb8df53e31e0a.tar.gz rails-27265ee57c9420e233c877c7280cb8df53e31e0a.tar.bz2 rails-27265ee57c9420e233c877c7280cb8df53e31e0a.zip |
Merge pull request #30995 from ahorek/fix_initial_count
fix initial count
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/alias_tracker.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/alias_tracker.rb b/activerecord/lib/active_record/associations/alias_tracker.rb index 07bd0a273b..14881cfe17 100644 --- a/activerecord/lib/active_record/associations/alias_tracker.rb +++ b/activerecord/lib/active_record/associations/alias_tracker.rb @@ -33,7 +33,7 @@ module ActiveRecord elsif join.respond_to? :left join.left.name == name ? 1 : 0 elsif join.is_a?(Hash) - join[name] + join.fetch(name, 0) else # this branch is reached by two tests: # |