-
- Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
Milestone
Description
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()toreject()unapprove()todisapprove()withUnaccepted()towithRejected()withoutUnaccepted()towithoutRejected()onlyUnaccepted()toonlyRejected()withInactive()towithDeactivated()withoutInactive()towithoutDeactivated()onlyInactive()toonlyDeactivated()withUnapproved()towithDisapproved()withoutUnapproved()towithoutDisapproved()onlyUnapproved()toonlyDisapproved()
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}FlagScopeadds global scopes to flag.Has{Name}FlagHelpersfor additional flag helper methods.Has{Name}FlagBehavior- used only in Kept flag to implement it's default behavior (model will be created withis_kept=falseand will change tois_kept=trueon 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.