We don't have state in posts. This is not a super high priority right now, but we should find a way to add this.
I couldn't get this working with the Ecto state machine project because I kept getting weird errors about cast/3. Was very odd.
I still think it may actually be simpler to take this approach:
We could replace aasm transitions from Rails with changeset pattern matching, something like: def transition_changeset(%Model{state: "from_this_state"} = model, "to_this_state") And then make a catchall that logs, complains, or just simply ignores transitions that we don't want. Probably want to pass in a changeset and return that so we can pipe with other changesets in the model.
We don't have
statein posts. This is not a super high priority right now, but we should find a way to add this.I couldn't get this working with the Ecto state machine project because I kept getting weird errors about
cast/3. Was very odd.I still think it may actually be simpler to take this approach: