Class: Admin::TagsController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::TagsController
- Defined in:
- app/controllers/wechat/admin/tags_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/wechat/admin/tags_controller.rb', line 17 def create @tag = @app..build(tag_params) unless @tag.save render :new, locals: { model: @tag }, status: :unprocessable_entity end end |
#index ⇒ Object
6 7 8 9 10 11 |
# File 'app/controllers/wechat/admin/tags_controller.rb', line 6 def index q_params = {} q_params.merge! params.permit(:name) = @app..default_where(q_params).order(id: :asc).page(params[:page]) end |
#new ⇒ Object
13 14 15 |
# File 'app/controllers/wechat/admin/tags_controller.rb', line 13 def new @tag = @app..build end |
#sync ⇒ Object
25 26 27 |
# File 'app/controllers/wechat/admin/tags_controller.rb', line 25 def sync @app. end |