Skip to content

Releases: Alexander-Senko/adjustable_schema

v0.8.0

08 Nov 14:11
bae5d9c
Compare
Choose a tag to compare

Changed

  • Renamed checks for related records:
    <associat>ful form 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

08 Nov 13:41
532832c
Compare
Choose a tag to compare

Fixed

  • roleless scope used to generate wrong queries.

Full Changelog: v0.7.1...v0.7.2

v0.7.1

08 Nov 13:41
d7f57e6
Compare
Choose a tag to compare

Fixed

  • DB constraints:
    • roles.name is NOT NULL,
    • UNIQUE constraints should treat NULLS as NOT DISTINCT.
  • Roleless recursive associations used to fail on joins.

Full Changelog: v0.7.0...v0.7.1

v0.7.0

08 Nov 13:40
f0fcea6
Compare
Choose a tag to compare

Changed

  • Naming: improved passive forms a bit.
  • Configuration: renamed self_related to self.

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

08 Nov 13:39
a148ed1
Compare
Choose a tag to compare

Changed

  • Destroy orphaned relationships of an object on destroy.
  • Symbolize configurable names used for associations, methods, etc.
  • Raise ArgumentError for unknown names passed to the API.

Added

  • Relationship[] to filter relationships by related objects/classes.
  • Role[] accepts Hash-like parameters to filter roles by relationships.
  • Methods for related records:
    • related? to check for related objects,
    • related to fetch them,
    • and the basic relationships.
  • Recursive methods for related records:
    • flat ancestors & descendants with distance,
    • based on recursive association scope.
  • roleless scope 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

08 Nov 13:38
c4d7e82
Compare
Choose a tag to compare

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