I’m using AASM by Rubyist to build a 4-step wizard for an AR object. According to the state of the object, there are different validations that need to be done. What is the smartest way to validate an object according to it’s state on a certain transition?
Share
Use the
:ifoption, andwith_optionsto bunch ’em together.What exactly you ought to write in the if-proc depends on your implementation, obviously.