I would like to create a website that will require users to Register. There will be a three step registration process - the user will click "Register" on the home page, and that will take them to Registration Page 1 where they will enter all the required fields (name, email, user ID & password, etc.), and click continue to go to page 2. On Registration Page 2, they can fill in optional fields, then click the "Register" button. When they click "Continue" on Page 1, the application will create a user model, and give it a user status of "In Setup", then route them to Registration Page 2. When they click "Register" on Page 2, the application will update the user, and set the user status to "Pending Activation", send an activation code via email to that user, and route them back to the Home Page. The final step is when the user returns to the Home Page, they will click "Log In" and be routed to the Log In Page. When they enter their user ID & Password and click "Log In", since their user status is "Pending Activation", they will be routed to the Activation Page where they need to enter their activation code and click "Activate". At that time, the application will set their status to "Active" and allow them to login. This all seems very normal to me, but how should I set up my views/ controllers/actions to do all of this in a RESTful design? (I am using Rails 2.2.2) Thank you for any suggestions you can offer, Steve J.
on 2009-05-02 01:28
on 2009-05-02 01:35
These tutorials will show you how to set up a user registration/authentication system with Authlogic, and then to set up a password reset system. It'll give you a good start on a RESTful setup, which you can then tweak however you like. http://github.com/binarylogic/authlogic_example/tree/master http://www.binarylogic.com/2008/11/16/tutorial-res... Requiring an email activation is closely related to reseting someone's password - once you've worked through these two tutorials, you should have everything you need.
on 2009-05-02 03:17
Thanks for the tutorials - That is what I need because the books I have read so far are good, but a little too basic for what I am trying. On May 1, 5:35 pm, Chris H. <email@example.com>
on 2009-05-02 03:42
If you are interested in a complete system that also handles payment from your users you could try RailsKit - Subscription code. Its not free and I am only a customer but it is very comprehensive for setting up a Saas (Software as a Service) website.