Class: ExpressTranslate::BaseController

Inherits:
ActionController::Base
  • Object
show all
Includes:
ExpressTranslate
Defined in:
app/controllers/express_translate/base_controller.rb

Instance Method Summary collapse

Methods included from ExpressTranslate

clear, config, #language, reset, root, seeds, setup

Instance Method Details

#check_authenticationObject

Check login status by cookie



5
6
7
8
# File 'app/controllers/express_translate/base_controller.rb', line 5

def check_authentication
  token_store = Utils.getCookie(request.headers["HTTP_COOKIE"], "token")
  return (token_store.present? and Account.find_by_token(token_store).present?)
end