From 7bb84e64979edda8e76f077bd58aeb35857aec23 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 6 May 2016 17:59:45 -0300 Subject: Change landing page when skipping confirmation email and add documentation --- app/controllers/registrations_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/registrations_controller.rb') diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 352bff19383..26eb15f49e4 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -37,8 +37,8 @@ class RegistrationsController < Devise::RegistrationsController super end - def after_sign_up_path_for(_resource) - users_almost_there_path + def after_sign_up_path_for(user) + user.confirmed_at.present? ? dashboard_projects_path : users_almost_there_path end def after_inactive_sign_up_path_for(_resource) -- cgit v1.2.1 From f04c5b27f0c19dfab00a6ac2de8b4168b67fe7a0 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 20 May 2016 13:52:42 -0400 Subject: current_user.confirmed_at.present? => current_user.confirmed? --- app/controllers/registrations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/registrations_controller.rb') diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 26eb15f49e4..75b78a49eab 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -38,7 +38,7 @@ class RegistrationsController < Devise::RegistrationsController end def after_sign_up_path_for(user) - user.confirmed_at.present? ? dashboard_projects_path : users_almost_there_path + user.confirmed? ? dashboard_projects_path : users_almost_there_path end def after_inactive_sign_up_path_for(_resource) -- cgit v1.2.1