Releases: Alexander-Senko/adjustable_schema
Releases · Alexander-Senko/adjustable_schema
v0.11.1
Fixed
- Associations setup for inherited models got broken in v0.11.0.
Full Changelog: v0.11.0...v0.11.1
v0.11.0
Changed
- Deprecated
Relationship.seed!in favor ofAdjustableSchema.relationship!. - Special naming rules for “actor-like” models: switched from
<associat>fulform to check for related records’ presence back to a passive one (<associat>ed). Thus, it’sauthoredandeditednow instead ofauthorfulandeditful. Relationship.to/.ofhandle STI classes precisely instead of falling back to a base class.- Customized inspections for
Relationship.
Added
referencing/referenced_byscopes to filter by related records.#referencing!/#referenced_by!setters to add related records.- Short-cut methods for related records. For example,
authorsassociation provides the following extras:.authored_byscope to filter records by authors,#authored_by?— to check if the record is authored by provided ones,#authored_by!— to add an author.
Full Changelog: v0.10.0...v0.11.0
v0.10.0
Changed
- No more polymorphic STI associations tricks (see 0dd3022 for details).
Added
- Special naming rules for “actor-like” models.
Full Changelog: v0.9.0...v0.10.0
v0.9.0
Changed
- Requires Rails 8 and Ruby 3.4+.
- Protected
AdjustableSchema::Relationship::Rolefrom being deleted when used.
Added
Relationship#sourcedandRelationship#targetedscopes to filter relationships by presence of source and target records respectively.
Fixed
-
Relationship#appliedscope used to return relationships with at least one record attached, instead of ones with both records present.Full Changelog: v0.8.0...v0.9.0
v0.8.0
Changed
- Renamed checks for related records:
<associat>fulform is now used instead of a passive one (<associat>ed) to check for related records’ presence..<associat>ful— scope records having associated ones.#<associat>ful?— are there any records associated?
- Naming: improved passive forms for words ending with
or/ant/ion/ment/ing.
Added
- Checks for related records’ presence on roleless recursive associations:
.<associat>ful—
records having associated ones;.<association>less—
records not having associated ones;#<associat>ful?—
if there are records associated;#<association>less?—
if there are no records associated;#intermediate?—
whether is only one child record associated (Is the node just a link between two other nodes like?);#branching?—
whether are several child records associated.
Fixed
- Naming: passive form for
author.
Full Changelog: v0.7.2...v0.8.0
v0.7.2
v0.7.1
Fixed
- DB constraints:
roles.nameisNOT NULL,UNIQUEconstraints should treatNULLSasNOT DISTINCT.
- Roleless recursive associations used to fail on
joins.
Full Changelog: v0.7.0...v0.7.1
v0.7.0
Changed
- Naming: improved passive forms a bit.
- Configuration: renamed
self_relatedtoself.
Added
- Checks for related records’ presence:
.<associat>ed—
records having associated ones,.<association>less—
records not having associated ones,#<associat>ed?—
if there are records associated,#<association>less?—
if there are no records associated.
- Documentation: self-targeted relationships in README.
Fixed
- Documentation: examples in the README.
Full Changelog: v0.6.0...v0.7.0
v0.6.0
Changed
- Destroy orphaned relationships of an object on destroy.
- Symbolize configurable names used for associations, methods, etc.
- Raise
ArgumentErrorfor unknown names passed to the API.
Added
Relationship[]to filter relationships by related objects/classes.Role[]acceptsHash-like parameters to filter roles by relationships.- Methods for related records:
related?to check for related objects,relatedto fetch them,- and the basic
relationships.
- Recursive methods for related records:
- flat
ancestors&descendantswith distance, - based on
recursiveassociation scope.
- flat
rolelessscope for related records without a role.- A dedicated association for roleless children.
Fixed
- Faulty scopes in role-based relationship associations.
- Naming for namespaced models, e.g., in Rails Engines.
Full Changelog: v0.5.0...v0.6.0
v0.5.0
Refactored from Rails Dynamic Associations.
Some experimental features are missing and can be found in the api branch.
Full Changelog: https://github.com/Alexander-Senko/adjustable_schema/commits/v0.5.0