Map.login

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.

On Sun, Jul 18, 2010 at 6:33 PM, Abder-Rahman A. [email protected]
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 ~

Leonardo M. wrote:

On Sun, Jul 18, 2010 at 6:33 PM, Abder-Rahman A. [email protected]
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 part for example?

Thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs