Send email to users related with an investment when valuation comment is created
This commit is contained in:
@@ -14,6 +14,7 @@ class CommentsController < ApplicationController
|
||||
if @comment.save
|
||||
CommentNotifier.new(comment: @comment).process
|
||||
add_notification @comment
|
||||
EvaluationCommentNotifier.new(comment: @comment).process if send_evaluation_notification?
|
||||
else
|
||||
render :new
|
||||
end
|
||||
@@ -107,4 +108,7 @@ class CommentsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def send_evaluation_notification?
|
||||
@comment.valuation && Setting["feature.valuation_comment_notification"]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user