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.
[email protected] 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