eBooru/test/mailers/previews/user_mailer_preview.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

17 lines
339 B
Ruby

# frozen_string_literal: true
class UserMailerPreview < ActionMailer::Preview
def dmail_notice
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