app/mailers/thredded/post_mailer.rb in thredded-0.2.2 vs app/mailers/thredded/post_mailer.rb in thredded-0.3.0
- old
+ new
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+require_dependency 'thredded/topic_email_view'
module Thredded
class PostMailer < Thredded::BaseMailer
def at_notification(post_id, emails)
- @post = Post.find(post_id)
- email_details = TopicEmailDecorator.new(@post.postable)
+ @post = find_record Post, post_id
+ email_details = TopicEmailView.new(@post.postable)
headers['X-SMTPAPI'] = email_details.smtp_api_tag('at_notification')
mail from: email_details.no_reply,
to: email_details.no_reply,
bcc: emails,