Realized state machine with aasm gem