module Devise::Controllers::Helpers
def after_sign_in_path_for(resource_or_scope)
end
end
super
else
publisher_url
if resource.is_a?(User) && resource.can_publish?
stored_location_for(resource) ||
def after_sign_in_path_for(resource)
if this default is not enough, you can customize it, for example:
If the resource root path is not defined, root_path is used. However,
end
root 'users#index' # creates user_root_path
namespace :user do
get '/users' => 'users#index', as: :user_root # creates user_root_path
the following way:
root path. For a user scope, you can define the default url in
session, then it fallbacks to resource_root_path, otherwise it uses the
By default, it first tries to find a valid resource_return_to key in the
provide a custom hook for a custom resource.
controllers and you can overwrite it in your ApplicationController to
The default url to be used after signing in. This is used by all Devise
def after_sign_in_path_for(resource_or_scope) stored_location_for(resource_or_scope) || signed_in_root_path(resource_or_scope) end