Class: EricWeixin::Cms::BaseController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- EricWeixin::Cms::BaseController
show all
- Defined in:
- app/controllers/eric_weixin/cms/base_controller.rb
Direct Known Subclasses
Weixin::ArticleDatasController, Weixin::CustomsServiceRecordsController, Weixin::MediaArticlesController, Weixin::MediaNewsController, Weixin::MediaResourcesController, Weixin::NewsDatasController, Weixin::PublicAccountsController, Weixin::ReplyMessageRulesController, Weixin::TwoDimensionCodesController, Weixin::UrlEncodesController, Weixin::UsersController, Weixin::WeixinUsersController, Weixin::Xiaodian::OrdersController, Weixin::Xiaodian::ProductsController
Instance Method Summary
collapse
Instance Method Details
#current_user ⇒ Object
9
10
11
12
|
# File 'app/controllers/eric_weixin/cms/base_controller.rb', line 9
def current_user
return nil if session[:employee_id].blank?
::Personal::Employee.find(session[:employee_id])
end
|
#need_login ⇒ Object
14
15
16
17
|
# File 'app/controllers/eric_weixin/cms/base_controller.rb', line 14
def need_login
redirect_to '/cms' if current_user.blank?
return
end
|
#round ⇒ Object
5
6
7
|
# File 'app/controllers/eric_weixin/cms/base_controller.rb', line 5
def round
yield
end
|