Reputation: 819
I have a login form (/user).
And methods:
-authenticate
-logout
And one view index.html.erb, it contains the login form, authenticate is work fine, but I think I have problems with routing.
Can you give me a sample route?
My router looks like:
map.logout 'logout', :controller => 'sessions', :action => 'destroy'
map.login 'login', :controller => 'sessions', :action => 'new'
In sessions control have destroy method, but when I type /logout it's say: Missing template session/destroy.erb in view path app/view
Upvotes: 0
Views: 149
Reputation: 46914
All routing system is explain on guides :
This one in particular : http://guides.rubyonrails.org/routing.html
Upvotes: 0
Reputation: 25994
A sample route in Rails 3
match '/user(/index)' => 'users#index'
It would be helpful if you could clarify the issue you're having (and post relevant code).
Upvotes: 1