Class: ClarkKent::ReportEmailsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ClarkKent::ReportEmailsController
- Defined in:
- app/controllers/clark_kent/report_emails_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
10 11 12 13 14 |
# File 'app/controllers/clark_kent/report_emails_controller.rb', line 10 def create @report_email = ClarkKent::ReportEmail.new(report_email_params) @report_email.save render partial: 'edit', locals: {report_email: @report_email} end |
#destroy ⇒ Object
30 31 32 33 |
# File 'app/controllers/clark_kent/report_emails_controller.rb', line 30 def destroy @report_email.destroy head :ok end |
#edit ⇒ Object
20 21 22 |
# File 'app/controllers/clark_kent/report_emails_controller.rb', line 20 def edit render partial: 'edit', locals: {report_email: @report_email} end |
#new ⇒ Object
5 6 7 8 |
# File 'app/controllers/clark_kent/report_emails_controller.rb', line 5 def new @report_email = ClarkKent::ReportEmail.new(report_id: @report.id) render partial: 'form', locals: {report_email: @report_email} end |
#show ⇒ Object
16 17 18 |
# File 'app/controllers/clark_kent/report_emails_controller.rb', line 16 def show render partial: 'show', locals: {report_email: @report_email} end |
#update ⇒ Object
24 25 26 27 28 |
# File 'app/controllers/clark_kent/report_emails_controller.rb', line 24 def update @report_email.update_attributes(report_email_params) @ajax_flash = {notice: "Your changes were saved."} render partial: 'show', locals: {report_email: @report_email} end |