Skip to content

State groups #5

@tillsc

Description

@tillsc

Mostly you don't want to do something only in one state but in a collection of states. This leads to code like where(workflow_state: ['foo', 'bar']). It would be very useful to name this kind of state combination.

This could be done by metadata: state :foo, groups: [:baz].
For every group there should be generated the same methods generated for states themselves. E.g. o.baz? should return true if o is in state :foo or in some other state referring to :baz.

Scopes (see #3) would be very useful too... Maybe this meachanism could/should even be used to implement #4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions