I am using AASM. I have an event defined with a transition. It works if the event is raised and the model is in :from state. However it throws InValidTransition exception if the model is in any other state.
aasm_state :first
aasm_sate :second
aasm_state :third
aasm_event :myevent do
transitions :from => :second, :to => :third
end
Now, if I do mymodel.myevent! when mymodel is in :first or :third state, aasm throws InValidTransition. How can I tell aasm to ignore the event when in those states?