plataformatec/devise — Issue #1600: Documentation regarding redirect in SessionsController#create e.g. sign_in
Author: mulderp
Created: 2012-01-25 20:44:35+00:00
State: open

Not sure, if it's really an issue, but evt. reporting and feedback on this might be helpful for other users (note plural).

I created a

devise_for :users

in my Rails 3.1 project.
Now, when I want to have a redirect to a dashboard after sign in, in the documentation there is mentioned to set a (singular)

user_root_path

This translates into a setting in routes.rb as follows:

match 'dashboard' => 'dashboard#index', as: :user_root

Evt. this is confusing when having a "users" (plural) namespace already, as you specify with the devise_for :users declaration. Mentioning the difference in plural and singular in the documentation, or having a singular devise_for :user, or a lookup to users_root_path could be more clear.

evt. I am missing something in my thinking, what you think?

thanks in any case!