Class: Admin::NoticesController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::NoticesController
- Defined in:
- app/controllers/wechat/admin/notices_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/controllers/wechat/admin/notices_controller.rb', line 14 def create @notice = @template.notices.build(notice_params) unless @notice.save render :new, locals: { model: @notice }, status: :unprocessable_entity end end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/wechat/admin/notices_controller.rb', line 6 def index @notices = @template.notices.page(params[:page]) end |
#new ⇒ Object
10 11 12 |
# File 'app/controllers/wechat/admin/notices_controller.rb', line 10 def new @notice = @template.notices.build end |