update base controllers

This commit is contained in:
Yan
2018-02-23 14:45:53 +06:30
parent 643a9d71be
commit 25a212bb70
10 changed files with 14 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ module LicenseVerification
if (!@license.nil?)
# logger.info "Location - " + @license.name
ActiveRecord::Base.establish_connection(website_connection(@license))
authenticate_session_token
# authenticate_session_token
# logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
else
# reconnect_default_db
@@ -40,6 +40,7 @@ module LicenseVerification
@user = Employee.authenticate_by_token(token)
if !@user
flash[:notice] = 'Invalid Access!'
redirect_to root_path
end
end
end