Skip to content

v3.0 release #14

@antonkomarev

Description

@antonkomarev

The new v3.0 release is in progress and will include a lot of changes.

Flags methods naming convention

Methods naming convention was approved. That means couple of current methods will be renamed to follow the convention. That's the only breaking change in this release.

These methods should be renamed to upgrade from v2.0:

  • unaccept() to reject()
  • unapprove() to disapprove()
  • withUnaccepted() to withRejected()
  • withoutUnaccepted() to withoutRejected()
  • onlyUnaccepted() to onlyRejected()
  • withInactive() to withDeactivated()
  • withoutInactive() to withoutDeactivated()
  • onlyInactive() to onlyDeactivated()
  • withUnapproved() to withDisapproved()
  • withoutUnapproved() to withoutDisapproved()
  • onlyUnapproved() to onlyDisapproved()

New structure of flag traits

New structure fully compatible with v2.0. All flag traits were spliced on a multiple files which included in root flag trait.

Each flag has root trait Has{Name}Flag which will use:

  • Has{Name}FlagScope adds global scopes to flag.
  • Has{Name}FlagHelpers for additional flag helper methods.
  • Has{Name}FlagBehavior - used only in Kept flag to implement it's default behavior (model will be created with is_kept=false and will change to is_kept=true on first model update).

This will add possibility to use only global scope methods, or only helpers without adding whole flag functionality. Helper methods will bring common checks for the flags.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions