以下示例是关于Ruby中包含预览邮件轨道用法的示例代码,想了解预览邮件轨道的具体用法?预览邮件轨道怎么用?预览邮件轨道使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。
# located in test/mailers/previews/notifier_mailer_preview.rb
class NotifierPreview < ActionMailer::Preview
# Accessible from http://localhost:3000/rails/mailers/notifier/welcome
def welcome
Notifier.welcome(User.first)
end
end
本文地址:https://www.itbaoku.cn/snippets/785320.html