Nevermind..
In the acts_as_statemachine plugin the dynamically generated event methods make a call to 'fire' which in turn makes a call to 'perform' which does an 'update_attribute' against the record which does a save on the record. I hope this helps somebody else. - Brian Cardarella On Sep 8, 2:54 pm, bcardarella <[EMAIL PROTECTED]> wrote: > I'm adding some code to a project using restful_authentication and > acts_as_statemachine > > In the create method for a user there is the following code generated > by the restful_authentication template > > @user.regster! if user.valid? > > And this will save and the user record if it is valid. I understand > that the statemachine will then change the state from passive to > pending. It will guard against this by validating that the > crypted_password and password getters are not blank. This I > understand. I am not seeing anything in the code that actually does an > ActiveRecord::Base.save on it. restful_authentication seems to be > pretty much just generated templates and I cannot find any code that > saves the record and there doesn't seem to be anything in > acts_as_statemachine that recognizes this particular state change and > saves the record. Perhaps I am missing something or maybe there is > something else going on that saves the record. I don't see any type of > observer running that will save the record upon a state change. I > understand the purpose of state machines but for whatever reason I > just cannot see how this plugin is saving the record. Any help would > be appreciated. > > - Brian Cardarella --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

