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:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user