Class: EricWeixin::Cms::Weixin::WeixinUsersController
- Inherits:
-
BaseController
- Object
- BaseController
- EricWeixin::Cms::Weixin::WeixinUsersController
- Defined in:
- app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb', line 2 def index @public_accounts = ::EricWeixin::PublicAccount.all public_account = ::EricWeixin::PublicAccount.find_by_id(params[:public_account_id]) @weixin_users = public_account.weixin_users.custom_query(params.permit(:subscribe, :nickname, :sex, :city, :province, :weixin_public_account_id, :start_date, :end_date, :first_register_channel, :last_register_channel)). order(id: :desc). paginate(page: params[:page]||1, per_page: params[:per_page]||10) unless public_account.blank? end |
#modify_remark ⇒ Object
19 20 21 22 23 24 |
# File 'app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb', line 19 def modify_remark user = ::EricWeixin::WeixinUser.find(params[:id]) user.set_remark params[:new_remark] user.reload render text: user.remark end |