I want to use token_authenticatable in my application (using Devise).
Using this answer I added class Users::SessionsController
in file app/controllers/users_sessions_controller.rb
(is file location correct?).
To generate authentication_token in database I added line current_user.reset_authentication_token!
as fourth line of create method.
Using "Configuring Controllers" section from devise docimentation I added line devise_for :users, :controllers => {:sessions => "users/sessions"}
to my routes.
I also have file app/views/users/session/new.html.erb
.
Now when I try to log in or log out in browser, I get Routing Error uninitialized constant Users
.
I have no idea what happens. I think I named controller class wrong, or placed it incorrectly, but don't know for sure.