Skip to content

v1.0.0

Latest

Choose a tag to compare

@ledermann ledermann released this 15 Nov 18:15
v1.0.0
0b02755

Read the upgrade notes before you upgrade.

Breaking changes

  • Ruby 3.3 or newer and Rails 8.1 or newer are required. The older versions reached their end of life.
  • Do not call internal methods on your models anymore. join_read_marks, mark_collection_as_read, mark_collection_item_as_read, reset_read_marks_for_user, readable_parent, the assert helpers and forget_memoized_read_mark_global are now private or moved to Unread::Internal. using_postgresql? is removed. The upgrade notes list the replacements.
  • mark_as_read!(:all) on a relation marks only the records of the relation. Before, it marked all records of the class (#119).
  • The migration generator creates a new migration for new installations: current migration version, no latin1 character set on MySQL, reader_id is NOT NULL, the column timestamp has precision: 6. Existing tables need no change, but the upgrade notes recommend a migration for the precision (#135).
  • The generator unread:polymorphic_reader_migration is removed.

New features

  • read?(reader) is the opposite of unread?(reader) (#116).
  • The migration generator has the option --primary-key-type, for example --primary-key-type=uuid (#105, #122).
  • The trilogy adapter for MySQL is supported.

Bug fixes

  • reload on a reader also clears the memoized global read mark.
  • The association ReadMark#readable is explicitly optional. Before, this depended on the load order of the app.
  • With UUIDs, with_read_marks_for needs only one query. Before, each call of unread? or have_read? sent an additional query.

Documentation

  • The README has new sections about performance and about new readers (#115, #133).
  • The usage example in the README gave wrong results. It is fixed (#85).

Full Changelog: v0.14.0...v1.0.0