Repository navigation
v0.3.2
Released to RubyGems on 2026-09-30.
Fixed
- Moving a record between owners now recounts the old owner when
belongs_touses a custom
primary_key:. - Polymorphic
belongs_towith customforeign_key:/foreign_type:no longer raises
NoMethodErroron save. - Moving a record away from a polymorphic type whose class no longer exists no longer raises
NameError; the new owner is still recounted. - With
includes(:counters), counters stay current after an update, and a missing counter
returns 0 without a query. - Two saves creating the same virtual counter at once no longer fail with
ActiveRecord::RecordNotUnique; the second updates the row instead. update_counter_cachewithout itsbelongs_toraises a clearArgumentErrorinstead of
NoMethodError ... for nil.
Changed
- Depend on
activerecordandactivesupportinstead of all ofrails. - Require Ruby >= 3.1 in the gemspec, matching the README and Rails 7.2.
- Test against every non-EOL Ruby (3.3, 3.4, 4.0) and Rails (8.0, 8.1).
- Expand the test suite to cover all branches.
- README: fix the
:ifexample (state_changed?is always false in after callbacks)
and note that:ifalso applies toafter_destroy.
Full changelog: v0.3.1...v0.3.2