From 9c9224039866575786c939addde2b780d6083c3f Mon Sep 17 00:00:00 2001 From: Rin Raeuber Date: Wed, 11 Dec 2013 16:58:59 +0100 Subject: [PATCH] Improve doc on AR integration clarify that changes to the record made before the transition will be saved, but those in an after_transition callback not :) --- lib/state_machine/integrations/active_record.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/state_machine/integrations/active_record.rb b/lib/state_machine/integrations/active_record.rb index bb19f09c..840577c7 100644 --- a/lib/state_machine/integrations/active_record.rb +++ b/lib/state_machine/integrations/active_record.rb @@ -35,6 +35,10 @@ module Integrations #:nodoc: # vehicle.ignite # => true # vehicle.reload # => # # + # *Note* that if you want a transition to update additional attributes of the record, + # either the changes need to be made in a +before_transition+ callback or you need + # to save the record manually. + # # == Events # # As described in StateMachine::InstanceMethods#state_machine, event