sends emails [#23]

This commit is contained in:
rgarcia
2015-08-07 20:52:53 +02:00
parent 6803dc9d74
commit 3752054aab
9 changed files with 62 additions and 1 deletions

View File

@@ -7,6 +7,10 @@ class CommentsController < ApplicationController
@comment = Comment.build(@debate, current_user, params[:comment][:body])
@comment.save!
@comment.move_to_child_of(@parent) if reply?
Mailer.comment(@comment).deliver_now
Mailer.reply(@comment).deliver_now
respond_with @comment
end