# RESTful User Registration

**URL:** <https://www.ruby-forum.com/t/restful-user-registration/167013>\
**Category:** Rails\
**Created:** [May 1, 2009, 11:28pm UTC](https://www.ruby-forum.com/t/restful-user-registration/167013 "2009-05-01T23:28:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![srj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@srj](https://www.ruby-forum.com/u/srj)\
**Post date:** [May 1, 2009, 11:28pm UTC](https://www.ruby-forum.com/t/restful-user-registration/167013/1 "2009-05-01T23:28:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![srj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@srj](https://www.ruby-forum.com/u/srj)\
**Post date:** [May 1, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/restful-user-registration/167013/2 "2009-05-01T23:35:25Z")

</div>

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.

> **[GitHub - binarylogic/authlogic\_example: An example rails app using the Authlogic...](https://github.com/binarylogic/authlogic_example/tree/master)**
>
> master

[http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/](http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/)

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.

---

<div class="post-metadata">

**Author:** ![srj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@srj](https://www.ruby-forum.com/u/srj)\
**Post date:** [May 2, 2009, 1:17am UTC](https://www.ruby-forum.com/t/restful-user-registration/167013/3 "2009-05-02T01:17:32Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![srj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9c0ed/32.png) [@srj](https://www.ruby-forum.com/u/srj)\
**Post date:** [May 2, 2009, 1:42am UTC](https://www.ruby-forum.com/t/restful-user-registration/167013/4 "2009-05-02T01:42:05Z")

</div>

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.
