thomasalbert
2009-Jan-31 09:15 UTC
What and where is the method register! in restful authentication?
A newbie question - I am learning restful authentication but I cant find what or where the method register! is when used in the following code: @user.register! if @user && @user.valid? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ramon Tayag
2009-Jan-31 11:05 UTC
Re: What and where is the method register! in restful authentication?
User acts as a state machine. Transitions automatically get methods that are named after them with a "!" at the end. Look for a transition called register and it shows from what state to what state this "register" can occur. Ramon Tayag On Sat, Jan 31, 2009 at 5:15 PM, thomasalbert <thomasalbertlane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > A newbie question - I am learning restful authentication but I cant > find what or where the method register! is when used in the following > code: > > @user.register! if @user && @user.valid? > > Thanks.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thomasalbert
2009-Feb-01 04:10 UTC
Re: What and where is the method register! in restful authentication?
Thanks Ramon, Never heard of finite state machines or acts_as_state_machine before, I have been chasing it on the web - more to learn. On Jan 31, 10:05 pm, Ramon Tayag <ramon.ta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> User acts as a state machine. Transitions automatically get methods > that are named after them with a "!" at the end. Look for a > transition called register and it shows from what state to what state > this "register" can occur. > > Ramon Tayag > > On Sat, Jan 31, 2009 at 5:15 PM, thomasalbert > > <thomasalbertl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > A newbie question - I am learning restful authentication but I cant > > find what or where the method register! is when used in the following > > code: > > > @user.register! if @user && @user.valid? > > > Thanks.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---