Class: ExpressTranslate::BaseController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ExpressTranslate::BaseController
- Includes:
- ExpressTranslate
- Defined in:
- app/controllers/express_translate/base_controller.rb
Direct Known Subclasses
AccountController, FilesController, OptionsController, ServicesController
Instance Method Summary collapse
-
#check_authentication ⇒ Object
Check login status by cookie.
Methods included from ExpressTranslate
clear, config, #language, reset, root, seeds, setup
Instance Method Details
#check_authentication ⇒ Object
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 |