Skip to content

Releases: bdurand/support_table_data

v1.5.2

17 Feb 00:29
f21ccf5

Choose a tag to compare

Added

  • Added rubocop:disable all around generated YARD documentation to prevent RuboCop offenses in the generated code. This ensures that the generated documentation does not cause any issues with RuboCop linting in the project.

Full Changelog: v1.5.1...v1.5.2

v1.5.1

16 Feb 20:14
547b85a

Choose a tag to compare

Added

  • YARD documentation tasks can now take an optional file path argument to add, verify, or remove documentation for a specific support table model instead of all models. For example, you can run bundle exec rake support_table_data:yard_docs:add[app/models/color.rb] to add documentation for the Color model.
  • Added comment in generated YARD documentation indicating the command to run to update them so that it's clear to users how to keep the documentation up to date.
  • Aliased support_table_data:yard_docs to support_table_data:yard_docs:add for convenience since adding the documentation is the most common action.

Full Changelog: v1.5.0...v1.5.1

v1.5.0

09 Jan 16:48
1cbec5f

Choose a tag to compare

Added

  • The default data directory in a Rails application can be set with the config.support_table.data_directory option in the Rails application configuration.
  • Added rake task support_table_data:yard_docs:add for Rails applications that will add YARD documentation to support table models for the named instance helpers. There is also a task support_table_data:yard_docs:verify that can be used in a build pipeline to verify that the documentation is up to date. You can also remove the documentation with the support_table_data:yard_docs:remove task.
  • The data synchronization task is now automatically attached to several Rails tasks: db:seed, db:seed:replant, db:prepare, db:test:prepare, db:fixtures:load. Support tables will be synced after running any of these tasks. This can be disabled by setting config.support_table.auto_sync = false in the Rails application configuration.

Changed

  • The default data directory is now set in a Railtie and can be overridden with the config.support_table.data_directory option in the Rails application configuration.
  • The support_table_key_attribute method now returns "id" if not explicitly set instead of implicitly interpreting nil as the primary key. This makes the behavior more consistent and explicit and avoids edge cases when running the code in environments where the database connection is not available. This is a breaking change if the table uses a primary key other than "id" and the support_table_key_attribute was not explicitly set to that primary key.

Full Changelog: v1.4.0...v1.5.0

v1.4.0

09 Jan 16:48
a87b2d1

Choose a tag to compare

Fixed

  • Honor single table inheritance class when creating new records in the database. This fixes issues where validations and callbacks on subclasses could be skipped when creating new records.

Removed

  • Removed support for ActiveRecord versions prior to 6.1.

Full Changelog: v1.3.1...v1.4.0

v1.3.1

30 Jan 23:29
ced83c5

Choose a tag to compare

What's Changed

  • Added support for autosave associations. Data in autosave associations will be persisted when the support table is synced if it was changed by the support table data.

Full Changelog: v1.3.0...v1.3.1

v1.3.0

30 Jan 23:22
9bf56a1

Choose a tag to compare

What's Changed

  • Added support_table_dependency method to explicitly define support table dependencies that cannot be inferred from model associations.

Full Changelog: v1.2.4...v1.3.0

v1.2.4

26 Aug 17:03
b199a9a

Choose a tag to compare

What's Changed

  • Handle edge cases in development and test on classes that become undefined by @bdurand in #11

Full Changelog: v1.2.3...v1.2.4

v1.2.2

21 Aug 17:52
fa78e8f

Choose a tag to compare

What's Changed

  • Add thread safety around modifying internal class variables by @bdurand in #9

Full Changelog: v1.2.1...v1.2.2

v1.2.1

24 May 18:31
dc4aa86

Choose a tag to compare

What's Changed

Full Changelog: v1.2.0...v1.2.1

v1.2.0

24 May 18:25
557bfd8

Choose a tag to compare

What's Changed

  • Added named instance helpers to make loading associated data easier. by @bdurand in #6
  • Added handling for through associations by @bdurand in #7

Full Changelog: v1.1.2...v1.2.0