# Restful authentication - session\_path

**URL:** <https://www.ruby-forum.com/t/restful-authentication-session-path/112961>\
**Category:** Rails\
**Created:** [August 25, 2007, 12:24am UTC](https://www.ruby-forum.com/t/restful-authentication-session-path/112961 "2007-08-25T00:24:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddancer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Post date:** [August 25, 2007, 12:24am UTC](https://www.ruby-forum.com/t/restful-authentication-session-path/112961/1 "2007-08-25T00:24:48Z")

</div>

trying to make use of the restful-authentication plugin,

however the login page gives…

ActionController::RoutingError in Sessions#new

Showing app/views/sessions/new.rhtml where line #1 raised:

session\_url failed to generate from {:controller=\>“sessions”,  
:action=\>“show”} - you may have ambiguous routes, or you may need to  
supply additional parameters for this route. content\_url has the  
following required parameters: [“session”, :id] - are they all  
satisifed?

Extracted source (around line #1):

1: \<% form\_tag session\_path do -%\>  
2:

Login  
  
3: \<%= text\_field\_tag ‘login’ %\>

  
4:

Have not been able to find or figure a solution.

Anyone have an idea?

Thanks,

Andy K.

---

<div class="post-metadata">

**Author:** ![ddancer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Post date:** [August 25, 2007, 12:42am UTC](https://www.ruby-forum.com/t/restful-authentication-session-path/112961/2 "2007-08-25T00:42:53Z")

</div>

On 8/24/07, Andy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> :action=\>“show”} - you may have ambiguous routes, or you may need to
> 
> Have not been able to find or figure a solution.
> 
> Anyone have an idea?

try new\_session\_path.

–  
Rick O.  
[http://lighthouseapp.com](http://lighthouseapp.com)  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)

---

<div class="post-metadata">

**Author:** ![ddancer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Post date:** [August 25, 2007, 12:44am UTC](https://www.ruby-forum.com/t/restful-authentication-session-path/112961/3 "2007-08-25T00:44:55Z")

</div>

found the problem,

in routes.rb,

was…  
map.resources :session, :controller =\> ‘sessions’

and should be…  
map.resource :session, :controller =\> ‘sessions’

subtle, but the plural “resources” was bad

/ak

Andy K. schrieb:
