Navin Samuel

Agony & Triumph (acts_as_state_machine)

In Cribbings, Tecnoquips on August 5, 2008 at 5:10 pm

You just learn some things the hard way! For a couple of hours I have been trying to get the ‘acts_as_state_machine’ to work in a consistent manner.  For some reason or the other, my unit & integration tests run perfectly fine while my program works once in a while! I would not have been thrown off guard had it not worked at all.

Finally after a very determined debugging session, I figured out that my object’s state would not change if the object is not already persisted! Now, that is common sense but would it not have helped to throw a small error if I tried to something like this? The plugin is great and I am not cribbing, but sometimes little things can really make your life miserable :)

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.