Skip to content
Snippets Groups Projects
Commit d4527732 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

when a contact is created an email is send to notify portalmec

parent 1ccfd390
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@ class V1::ContactsController < ApplicationController
def create
@contact = Contact.new(contact_params)
if @contact.save
ContactsMailer.new_contact_received(@contact).deliver_now
render json: @contact, status: :created
else
render json: @contact.errors, status: :unprocessable_entity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment