Sometimes you have a whole list of state transitions and you just want to disallow one or two instead of writing out all possible combinations.
Like this:
state_machine_enum :state, prefix: "state" do |s|
s.prevent_transition(:unavailable, :unpublished)
end
Having the posibility to spec the inverse would be cleaner, just like rails does it in various places with :allow, :except.
I understand this could be a bit involved since it would be nice to check we don't have conflicting rules. In that case an exception could be raised.
Sometimes you have a whole list of state transitions and you just want to disallow one or two instead of writing out all possible combinations.
Like this:
Having the posibility to spec the inverse would be cleaner, just like rails does it in various places with :allow, :except.
I understand this could be a bit involved since it would be nice to check we don't have conflicting rules. In that case an exception could be raised.