# Map.login

**URL:** <https://www.ruby-forum.com/t/map-login/191793>\
**Category:** Rails\
**Created:** [July 18, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/map-login/191793 "2010-07-18T23:33:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 18, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/map-login/191793/1 "2010-07-18T23:33:53Z")

</div>

In the Rails guides, under “Named Routes”, it mentions the following:

map.login ‘/login’, :controller =\> ‘sessions’, :action =\> ‘new’

So, do I conclude that .login in map.login is “built-in” Rails, and  
where used it denotes that a login form will be requested here?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 19, 2010, 2:59am UTC](https://www.ruby-forum.com/t/map-login/191793/2 "2010-07-19T02:59:37Z")

</div>

On Sun, Jul 18, 2010 at 6:33 PM, Abder-Rahman A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> In the Rails guides, under “Named Routes”, it mentions the following:
> 
> map.login ‘/login’, :controller =\> ‘sessions’, :action =\> ‘new’
> 
> So, do I conclude that .login in map.login is “built-in” Rails, and  
> where used it denotes that a login form will be requested here?

This is just a named route, no more, no less. Nothing built-in, no  
magic, just a name for the route.  
That will give you a “/login” route wich points to  
SessionsController#new (the “new” action in the “sessions” controller)

–  
Leonardo M…  
There’s no place like ~

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 19, 2010, 10:33am UTC](https://www.ruby-forum.com/t/map-login/191793/3 "2010-07-19T10:33:44Z")

</div>

Leonardo M. wrote:

> On Sun, Jul 18, 2010 at 6:33 PM, Abder-Rahman A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > In the Rails guides, under “Named Routes”, it mentions the following:
> > 
> > map.login ‘/login’, :controller =\> ‘sessions’, :action =\> ‘new’
> > 
> > So, do I conclude that .login in map.login is “built-in” Rails, and  
> > where used it denotes that a login form will be requested here?
> 
> This is just a named route, no more, no less. Nothing built-in, no  
> magic, just a name for the route.  
> That will give you a “/login” route wich points to  
> SessionsController#new (the “new” action in the “sessions” controller)
> 
> –  
> Leonardo M…  
> There’s no place like ~

Thanks a lot.

But, if we say, map.connect (Regular route), this has a specific  
meaning. Right? Is map.connect the [http://www.xyz.com](http://www.xyz.com) part for example?

Thanks.
