From 9998e00ae3fb6a9eed2aedd73078516f1f63eec3 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Sat, 19 Jul 2014 08:10:03 +0300 Subject: [PATCH] fix redirect error after sign_in --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5bf9ca6a..1517dc73 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -13,7 +13,7 @@ class ApplicationController < ActionController::Base end def after_sign_in_path_for(resource) - if can? :view, Conference && + if (can? :view, Conference) && (!session[:return_to] || session[:return_to] && session[:return_to] == root_path)