aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/internal_metadata.rb
diff options
context:
space:
mode:
authorAlberto Almagro <albertoalmagro@gmail.com>2018-10-12 17:14:06 +0200
committerAlberto Almagro <albertoalmagro@gmail.com>2018-10-16 13:16:09 +0200
commit5e92770e5a6d997e5f973cc59aebc58c4ebff80b (patch)
tree5a3613b8250f3f2100546e4c06da5841efaa9d5e /activerecord/lib/active_record/internal_metadata.rb
parentb0b0cd1fd77af3eec8b2b8760bace2572e04a3a3 (diff)
downloadrails-5e92770e5a6d997e5f973cc59aebc58c4ebff80b.tar.gz
rails-5e92770e5a6d997e5f973cc59aebc58c4ebff80b.tar.bz2
rails-5e92770e5a6d997e5f973cc59aebc58c4ebff80b.zip
Add regression test against habtm memoized singular_ids
Starting in Rails 5.0.0 and still present in Rails 5.2.1, `singular_ids` got memoized and didn't reload after more items were added to the relation. Although 19c8071 happens to fix the issue, it only adds tests for `has_many` relations while this bug only affected `has_and_belongs_to_many` relations. This commit adds a regression test to ensure it never happens again with `habtm` relations. Ensures #34179 never gets reproduced.
Diffstat (limited to 'activerecord/lib/active_record/internal_metadata.rb')
0 files changed, 0 insertions, 0 deletions