Class: Dune::Admin::ChannelsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Dune::Admin::ChannelsController
- Defined in:
- app/controllers/dune/admin/channels_controller.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.channel_actions ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/dune/admin/channels_controller.rb', line 18 def self.channel_actions %w[push_to_draft push_to_online].each do |action| define_method action do resource.send(action) flash.notice = I18n.t("dune.admin.channels.messages.successful.#{action}") redirect_to channels_path(params[:local_params]) end end end |
Instance Method Details
#create ⇒ Object
6 7 8 |
# File 'app/controllers/dune/admin/channels_controller.rb', line 6 def create create! { channels_path } end |
#destroy ⇒ Object
14 15 16 |
# File 'app/controllers/dune/admin/channels_controller.rb', line 14 def destroy destroy! { channels_path } end |
#update ⇒ Object
10 11 12 |
# File 'app/controllers/dune/admin/channels_controller.rb', line 10 def update update! { channels_path } end |