I've been struggling with something very silly here for some hours. No claptrap straight to the point. When I paste this into my posts#index page view file:
<p><%= link_to "log out", destroy_user_session_path, :method => :delete %></p>
and click on it inside the browser, the user successfully signs out. However...
When I do this somewhere else like after the user has signed in or after the user has signed up, then the user tries to log out from a page which we can call users#index. It then only gives me this error upon clicking the log out button.
Unknown action
The action 'show' could not be found for UsersController
I've tried quite a lot of things, jquery and the jquer.uls or something are included in the application.js file,
These are my routes, and I think they're right.
Proxima::Application.routes.draw do
devise_for :users
resources :users
resources :dashboard
resources :posts
authenticated :user do
root :to => 'dashboard#index'
end
resources :welcome
devise_for :users
resources :users
resources :dashboard
resources :posts
root :to => 'welcome#index'
end
This is silly, I can't understand what's going on here, I get that silly message time after time and still no stuff happens. Then I decide to actually write down the action "show" inside the UsersController, however... When I write redirect_to welcome_path it doesn't log out, I check that by actually accessing the root url again... Any ideas?