diff options
author | Sergio Cambra <sergio@programatica.es> | 2014-11-21 15:54:01 -1000 |
---|---|---|
committer | Sergio Cambra <sergio@programatica.es> | 2015-01-07 01:23:19 -1000 |
commit | 33a5416461bc5068d85d33259310f56625569e86 (patch) | |
tree | 8794404dbb36af4793c3214d2f6f029fbc1d5043 /activerecord/lib/active_record/dynamic_matchers.rb | |
parent | f9e0ec544989c2d93ed40d0acdbc627f6a624eb1 (diff) | |
download | rails-33a5416461bc5068d85d33259310f56625569e86.tar.gz rails-33a5416461bc5068d85d33259310f56625569e86.tar.bz2 rails-33a5416461bc5068d85d33259310f56625569e86.zip |
Includes HABTM returns correct size now. It's caused by the join dependency
only instantiates one HABTM object because the join table hasn't a primary key.
Updated commit from @bigxiang commit dbaa837
Fixes #16032.
Examples:
before:
Project.first.salaried_developers.size # => 3
Project.includes(:salaried_developers).first.salaried_developers.size # => 1
after:
Project.first.salaried_developers.size # => 3
Project.includes(:salaried_developers).first.salaried_developers.size # => 3
Diffstat (limited to 'activerecord/lib/active_record/dynamic_matchers.rb')
0 files changed, 0 insertions, 0 deletions