From d45277322b169e386b7fa3f12db7c8f3b5d5f82f Mon Sep 17 00:00:00 2001 From: Marcela Ribeiro de Oliveira <mro15@inf.ufpr.br> Date: Tue, 4 Apr 2017 11:45:22 -0300 Subject: [PATCH] when a contact is created an email is send to notify portalmec --- app/controllers/v1/contacts_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/v1/contacts_controller.rb b/app/controllers/v1/contacts_controller.rb index d1e589b4..a39ed6d7 100644 --- a/app/controllers/v1/contacts_controller.rb +++ b/app/controllers/v1/contacts_controller.rb @@ -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 -- GitLab