Class: Share::WechatUsersController
- Inherits:
-
BaseController
- Object
- BaseController
- Share::WechatUsersController
- Defined in:
- app/controllers/wechat/share/wechat_users_controller.rb
Instance Method Summary collapse
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #show ⇒ Object
- #try_match ⇒ Object
- #update ⇒ Object
Instance Method Details
#destroy ⇒ Object
35 36 37 |
# File 'app/controllers/wechat/share/wechat_users_controller.rb', line 35 def destroy @wechat_user.destroy end |
#edit ⇒ Object
19 20 21 |
# File 'app/controllers/wechat/share/wechat_users_controller.rb', line 19 def edit = @app. end |
#index ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/wechat/share/wechat_users_controller.rb', line 7 def index q_params = { 'user_tags.tag_id': @scene.tag&.id } q_params.merge! params.permit(:name) @wechat_users = @app.wechat_users.default_where(q_params).page(params[:page]) end |
#show ⇒ Object
16 17 |
# File 'app/controllers/wechat/share/wechat_users_controller.rb', line 16 def show end |
#try_match ⇒ Object
31 32 33 |
# File 'app/controllers/wechat/share/wechat_users_controller.rb', line 31 def try_match @result = @wechat_user.try_match end |
#update ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/wechat/share/wechat_users_controller.rb', line 23 def update @wechat_user.assign_attributes(wechat_user_params) unless @wechat_user.save render :edit, locals: { model: @wechat_user }, status: :unprocessable_entity end end |