From 831b2fccf9a2efc772d62c05f52c612f23a63ea9 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 19 Jun 2017 15:35:44 +0200 Subject: update missing email actions --- app/controllers/profiles/emails_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/profiles') diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb index 9159c217f1b..40b43278439 100644 --- a/app/controllers/profiles/emails_controller.rb +++ b/app/controllers/profiles/emails_controller.rb @@ -7,7 +7,7 @@ class Profiles::EmailsController < Profiles::ApplicationController def create @email = current_user.emails.new(email_params) - if @email.save + if Emails::CreateService.new(current_user, current_user, email_params).execute NotificationService.new.new_email(@email) else flash[:alert] = @email.errors.full_messages.first -- cgit v1.2.3