diaspora/app/mailers/notification_mailers/comment_on_post.rb
2013-08-25 18:21:14 +02:00

16 lines
547 B
Ruby

module NotificationMailers
class CommentOnPost < NotificationMailers::Base
include ActionView::Helpers::TextHelper
include MarkdownifyHelper
attr_accessor :comment
def set_headers(comment_id)
@comment = Comment.find(comment_id)
@headers[:from] = "\"#{@comment.author_name} (diaspora*)\" <#{AppConfig.mail.sender_address}>"
@headers[:subject] = truncate(strip_markdown(@comment.comment_email_subject.squish), :length => TRUNCATION_LEN)
@headers[:subject] = "Re: #{@headers[:subject]}"
end
end
end