Is it possible to send variables in the the transition? i.e.
@car.crash!(:crashed_by => current_user)
I have callbacks in my model but I nee
I was having trouble with all of the other answers, and then I found that you can simply override the event in the class.
class Car
state_machine do
...
event :crash do
transition any => :crashed
end
end
def crash(current_driver)
logger.debug(current_driver)
super
end
end
Just make sure to call "super" in your custom method