Redirects to admin/index after admin login

This commit is contained in:
Chrisbr 2014-05-23 17:05:19 +02:00
parent 643b8b173a
commit ff49443e9a

View file

@ -9,6 +9,12 @@ class ApplicationController < ActionController::Base
end
def after_sign_in_path_for(resource)
if organizer_or_admin? &&
(!session[:return_to] ||
session[:return_to] &&
session[:return_to] == root_path)
admin_conference_index_path
else
if session[:return_to] &&
!session[:return_to].start_with?(user_registration_path)
logger.debug "Returning to #{session[:return_to]}"
@ -18,6 +24,7 @@ class ApplicationController < ActionController::Base
super
end
end
end
def get_conferences
@conferences =Conference.all