Releases: bdurand/support_table_data
Releases · bdurand/support_table_data
v1.5.2
Added
- Added
rubocop:disable allaround 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
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 theColormodel. - 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_docstosupport_table_data:yard_docs:addfor convenience since adding the documentation is the most common action.
Full Changelog: v1.5.0...v1.5.1
v1.5.0
Added
- The default data directory in a Rails application can be set with the
config.support_table.data_directoryoption in the Rails application configuration. - Added rake task
support_table_data:yard_docs:addfor Rails applications that will add YARD documentation to support table models for the named instance helpers. There is also a tasksupport_table_data:yard_docs:verifythat can be used in a build pipeline to verify that the documentation is up to date. You can also remove the documentation with thesupport_table_data:yard_docs:removetask. - 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 settingconfig.support_table.auto_sync = falsein 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_directoryoption in the Rails application configuration. - The
support_table_key_attributemethod now returns "id" if not explicitly set instead of implicitly interpretingnilas 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 thesupport_table_key_attributewas not explicitly set to that primary key.
Full Changelog: v1.4.0...v1.5.0
v1.4.0
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
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
What's Changed
- Added
support_table_dependencymethod to explicitly define support table dependencies that cannot be inferred from model associations.
Full Changelog: v1.2.4...v1.3.0