Hi everyone- This is obviously a pattern, can someone suggest pseudocode, including where to put the mailing? I was thinking in the model: aftercreate: - create hash for link - send e-mail with clickable link in the view - if the create is successful, redirect to "you''ll be getting an e- mail" page in controller: - create an action called confirmation that takes hash and login from GET - change status of user to confirmed is there an easier (built-in to rails) approach? Thanks, Dino --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
look at restful_authentication, it provides a method for activating a user with an activation code and acts_as_state_machine http://svn.techno-weenie.net/projects/plugins/restful_authentication/ Mike On 2/28/08, dino d. <dinodorroco-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > > Hi everyone- > > This is obviously a pattern, can someone suggest pseudocode, including > where to put the mailing? > > I was thinking in the model: > > aftercreate: > - create hash for link > - send e-mail with clickable link > > in the view > - if the create is successful, redirect to "you''ll be getting an e- > mail" page > > in controller: > - create an action called confirmation that takes hash and login > from GET > - change status of user to confirmed > > > is there an easier (built-in to rails) approach? > > Thanks, > Dino > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ratnavel Sundaramurthi
2008-Feb-29 05:29 UTC
Re: validating user''s e-mail address with hashed link
validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => "is not valid" Try this.. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---