Class: MailgunListManager::ListsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- MailgunListManager::ListsController
- Defined in:
- app/controllers/mailgun_list_manager/lists_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 |
# File 'app/controllers/mailgun_list_manager/lists_controller.rb', line 10 def create List.add(list_params[:address], list_params) @lists = List.all end |
#destroy ⇒ Object
21 22 23 24 |
# File 'app/controllers/mailgun_list_manager/lists_controller.rb', line 21 def destroy List.destroy(params[:id]) @lists = List.all end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/mailgun_list_manager/lists_controller.rb', line 6 def index @lists = List.all end |
#update ⇒ Object
15 16 17 18 19 |
# File 'app/controllers/mailgun_list_manager/lists_controller.rb', line 15 def update list = List.find(params[:id]) @list = list.update(list_params) @old_id = params[:id] end |