Reputation: 11908
ActionView::Template::Error (No route matches {:controller=>"devise/items"}):
8: </head>
9: <body>
10: <nav>
11: <%= link_to_unless_current "Home", :controller => "items", :action => "index" %> |
12: <%= link_to_unless_current "About us", :controller => "site", :action => "about" %> |
13: <%= link_to_unless_current "Contact us", :controller => "site", :action => "contact" %>
14: </nav>
I'm trying to make a simple rails online shop. I included devise model User(strictly following Railcasts tutorial) and when I'm trying to go to /users/sign_in I get this error in the server log. I don't understand why it renders "devise/items" when I'm typing localhost:3000/users/sign_in.
Added: routes.rb:
devise_for :users
get "site/about"
get "site/contact"
resources :items
root :to => "items#index"
Upvotes: 3
Views: 255
Reputation: 5999
You can fix it adding a "/" before your controller name.
<%= link_to_unless_current "Home", :controller => "/items", :action => "index" %>
Upvotes: 3