Sha256: 5d15139181c87d34abae3b1b8f84f0027544a8225cb8d8c3824eb9f7ab3550df

Contents?: true

Size: 1.38 KB

Versions: 6

Compression:

Stored size: 1.38 KB

Contents

class EricWeixin::Cms::Weixin::WeixinUsersController < EricWeixin::Cms::BaseController
  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

  def modify_remark
    user = ::EricWeixin::WeixinUser.find(params[:id])
    user.set_remark params[:new_remark]
    user.reload
    render text: user.remark
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
eric_weixin-0.3.3 app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb
eric_weixin-0.3.2 app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb
eric_weixin-0.3.1 app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb
eric_weixin-0.3.0 app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb
eric_weixin-0.2.3 app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb
eric_weixin-0.2.1 app/controllers/eric_weixin/cms/weixin/weixin_users_controller.rb