Add new login design

This commit is contained in:
Martin Lensment 2014-09-25 14:19:53 +03:00
parent 1f2c12d7da
commit a0592833a9
17 changed files with 64 additions and 13 deletions

View file

@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
def after_sign_in_path_for(resource)
if current_user.admin?
if resource.admin?
(session[:user_return_to].nil?) ? admin_root_path : session[:user_return_to].to_s
else
(session[:user_return_to].nil?) ? client_root_path : session[:user_return_to].to_s