bcparanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Oct-08 04:31 UTC
RESTful authentication plugin test failure in Rails 2.0 Preview Release
The following tests are failing:
test_should_fail_cookie_login
test_should_login_with_cookie
test_should_fail_login_and_not_redirect
test_should_fail_expired_cookie_login
Error message:
test_should_fail_cookie_login(SessionsControllerTest):
ActionView::TemplateError: session_url failed to generate from
{:action=>"show", :controller=>"sessions"} - you may
have ambiguous
routes, or you may need to supply additional parameters for this
route. content_url has the following required parameters:
["sessions", :id] - are they all satisfied?
On line #1 of app/views/sessions/new.html.erb
1: <% form_tag session_path do -%>
2: <p><label
for="login">Login</label><br/>
3: <%= text_field_tag ''login'' %></p>
Did anyone resolve this issue? TIA.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Roderick van Domburg
2007-Oct-08 10:41 UTC
Re: RESTful authentication plugin test failure in Rails 2.0
bcparanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> The following tests are failing: > > test_should_fail_cookie_login > test_should_login_with_cookie > test_should_fail_login_and_not_redirect > test_should_fail_expired_cookie_login > > Error message: > > test_should_fail_cookie_login(SessionsControllerTest): > ActionView::TemplateError: session_url failed to generate from > {:action=>"show", :controller=>"sessions"} - you may have ambiguous > routes, or you may need to supply additional parameters for this > route. content_url has the following required parameters: > ["sessions", :id] - are they all satisfied? > On line #1 of app/views/sessions/new.html.erb > > > 1: <% form_tag session_path do -%> > 2: <p><label for="login">Login</label><br/> > 3: <%= text_field_tag ''login'' %></p> > > Did anyone resolve this issue? TIA.All resources in Rails 2.0 (even singular ones) are to be referred to as plural ones; see the Rails 2.0 PR announcement for the details. So don''t do: session_path And instead do: sessions_path -- Roderick van Domburg http://www.nedforce.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---