Administrateur can be param the acknowledgement of delivery mail object and body.
This commit is contained in:
parent
d438e9a329
commit
12ebab66cc
13 changed files with 222 additions and 6 deletions
20
app/controllers/admin/mails_controller.rb
Normal file
20
app/controllers/admin/mails_controller.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
class Admin::MailsController < AdminController
|
||||
before_action :retrieve_procedure
|
||||
|
||||
def index
|
||||
|
||||
end
|
||||
|
||||
def update
|
||||
mail = current_administrateur.procedures.find(params[:procedure_id]).mail_templates.find(params[:id])
|
||||
mail.update_attributes(update_params)
|
||||
|
||||
redirect_to admin_procedure_mails_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def update_params
|
||||
params.require(:mail_received).permit(:body, :object)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue