Class: Channels::ChannelsSubscribersController
- Inherits:
-
BaseController
- Object
- BaseController
- Channels::ChannelsSubscribersController
- Defined in:
- app/controllers/channels/channels_subscribers_controller.rb
Instance Method Summary collapse
- #create ⇒ Object (also: #index)
- #destroy ⇒ Object
Instance Method Details
#create ⇒ Object Also known as: index
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/channels/channels_subscribers_controller.rb', line 9 def create begin create! do |success,failure| success.html{ flash[:notice] = I18n.t('channels_subscribers.created') return redirect_to root_path } end rescue PG::Error, ActiveRecord::RecordNotUnique => e return redirect_to root_path end end |
#destroy ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'app/controllers/channels/channels_subscribers_controller.rb', line 22 def destroy destroy! do |success,failure| success.html{ flash[:notice] = I18n.t('channels_subscribers.deleted') return redirect_to root_path } end end |