Class: Nuntius::Admin::Lists::SubscribersController
- Inherits:
-
Nuntius::ApplicationAdminController
- Object
- Nuntius::ApplicationController
- Nuntius::ApplicationAdminController
- Nuntius::Admin::Lists::SubscribersController
- Defined in:
- app/controllers/nuntius/admin/lists/subscribers_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 |
# File 'app/controllers/nuntius/admin/lists/subscribers_controller.rb', line 20 def create @subscriber = @list.subscribers.new(subscriber_params) @subscriber.save # FIXME: This should redirect to list respond_with :admin, :list, @subscriber, collection_location: -> { nuntius.admin_list_url(@list) }, location: -> { nuntius.admin_list_url(@list) }, status: :see_other end |
#edit ⇒ Object
27 28 29 |
# File 'app/controllers/nuntius/admin/lists/subscribers_controller.rb', line 27 def edit @subscriber = @list.subscribers.find(params[:id]) end |
#index ⇒ Object
11 12 13 |
# File 'app/controllers/nuntius/admin/lists/subscribers_controller.rb', line 11 def index @subscribers = @list.subscribers.all end |
#new ⇒ Object
15 16 17 18 |
# File 'app/controllers/nuntius/admin/lists/subscribers_controller.rb', line 15 def new @subscriber = @list.subscribers.new render :edit end |
#update ⇒ Object
31 32 33 34 35 36 |
# File 'app/controllers/nuntius/admin/lists/subscribers_controller.rb', line 31 def update @subscriber = @list.subscribers.find(params[:id]) @subscriber.update(subscriber_params) # FIXME: This should redirect to list respond_with :admin, :list, @subscriber, collection_location: -> { nuntius.admin_list_url(@list) }, location: -> { nuntius.admin_list_url(@list) }, status: :see_other end |