not compitable with our tech

This commit is contained in:
Yan
2017-09-21 17:51:59 +06:30
parent 1a4ca5238f
commit 3e4fc7d45d
9 changed files with 486 additions and 506 deletions

View File

@@ -9,13 +9,11 @@ class ApplicationController < ActionController::Base
#all token authentication must be done here
#response format must be set to JSON
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
redirect_to root_path
end
def current_user
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
end