Displaying articles with tag

Acts as state machine not saving to the database?

Posted by joakimk, Tue Jan 20 18:18:00 UTC 2009

Just wasted a bit of time figuring out why my tests ran just fine, while trying to enter a state when actually using the app failed. Turns out that because I do not touch the database in my state machine specs I had no chance of discovering that I had written “aasm_event :foo! do” instead of “aasm_event :foo do” (see that extra “!”?)... D’oh. Hope this can be of help to anyone else that accidentally adds an ! to a aasm_event :).

0 comments | Filed Under: | Tags: