# Regarding REST

**URL:** <https://www.ruby-forum.com/t/regarding-rest/160239>\
**Category:** Rails\
**Created:** [February 13, 2009, 10:37am UTC](https://www.ruby-forum.com/t/regarding-rest/160239 "2009-02-13T10:37:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaitanya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/848f3c/32.png) [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Post date:** [February 13, 2009, 10:37am UTC](https://www.ruby-forum.com/t/regarding-rest/160239/1 "2009-02-13T10:37:45Z")

</div>

How to write routes.rb specification to add login.rhtml and  
register.rhtml files into my application.

---

<div class="post-metadata">

**Author:** ![chaitanya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/848f3c/32.png) [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Post date:** [February 13, 2009, 10:50am UTC](https://www.ruby-forum.com/t/regarding-rest/160239/2 "2009-02-13T10:50:44Z")

</div>

Login function is like method “get”  
Register function is like method “post”

The syntax for this is :

map.resources :Controller\_names, :Login =\> { :read =\> :get }  
map.resources :Controller\_names, :Register =\> { :read =\> :post }

Enjoiy…

Regards  
hafeez

---

<div class="post-metadata">

**Author:** ![chaitanya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/848f3c/32.png) [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Post date:** [February 13, 2009, 5:57pm UTC](https://www.ruby-forum.com/t/regarding-rest/160239/3 "2009-02-13T17:57:56Z")

</div>

Krishna Porandla wrote:

> How to write routes.rb specification to add login.rhtml and  
> register.rhtml files into my application.

Take a look as restful\_authentication plugin, even if you don’t end up  
using it, it will show you how they do authentication RESTfully.

> **[GitHub - technoweenie/restful-authentication: inactive project](https://github.com/technoweenie/restful-authentication/tree/master)**
>
> master

Of course, I think reinventing the authentication wheel is a waist of  
time, when plugins like restful\_authentication, among others, do the job  
quite well.
