remove comment mention mail, use reply mail instead

This commit is contained in:
jomo
2015-02-08 01:18:09 +01:00
parent f82af96759
commit 05760b845c
6 changed files with 18 additions and 73 deletions

View File

@@ -18,7 +18,6 @@ class CommentsController < ApplicationController
@comment.blogpost = Blogpost.find(params[:blogpost_id])
if @comment.save
@comment.send_new_comment_mail
@comment.send_new_mention_mail
position = @comment.blogpost.comments.count - 1
page = position / Kaminari.config.default_per_page + 1
redirect_to blogpost_path(@comment.blogpost, page: page) + "#comment-#{@comment.id}", notice: 'Comment created!'
@@ -39,7 +38,7 @@ class CommentsController < ApplicationController
@comment.attributes = comment_params
old_content = @comment.content_was
if @comment.save
@comment.send_new_mention_mail(old_content)
@comment.send_new_comment_mail(old_content)
flash[:notice] = "Comment updated!"
position = @comment.blogpost.comments.index(@comment)
page = position / Kaminari.config.default_per_page + 1