The docs for ActiveRecord show this:
after_transition any => :parked do |vehicle, transition|
vehicle.seatbelt = 'off'
end
I would then expect that the new value for vehicle.seatbelt would be saved to the database. But this doesn't happen (state_machine v. 1.2, rails v. 3.2.15): the attribute is changed, but if I reload from the DB, it goes back to the old value.
On the contrary, the new value gets saved in a before_transition.
Is this a bug, or just something that should be clarified in the documentation?