Brand spanking new to FSMs and State_Machine, so looking for some simple advice.
I have a simple model in an app which tracks customer service requests, the request can be in various states, open, assigned, resolved etc It's a pattern I'm sure you've all seen.
I have some attributes on the model which I want to set as part of an event, so when I call the 'close' event, I want the state to change, the 'closed_at' column to be updated to the current datetime and the 'closed_by' attribute to be set to the current user.
What is the best way of handling this? I couldn't find a way of referencing the instance from within the event :close block
Thanks for any help.