Fix #3846: Subscribed forum posts link to invalid URL in email updates.

Test: http://localhost/rails/mailers/user_mailer/forum_notice
This commit is contained in:
evazion
2018-08-27 22:04:37 -05:00
parent 47e26419d3
commit 604bfb0923
2 changed files with 9 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<p>
<strong><%= forum_post.creator_name %> said:</strong>
</p>
<%= format_text(forum_post.body) %>
<%= format_text(forum_post.body, base_url: root_url) %>
<br>
<hr>
<br>

View File

@@ -3,4 +3,12 @@ class UserMailerPreview < ActionMailer::Preview
dmail = User.admins.first.dmails.first
UserMailer.dmail_notice(dmail)
end
def forum_notice
topic = ForumTopic.first
posts = topic.posts
user = topic.creator
UserMailer.forum_notice(user, topic, posts)
end
end