我正在关注michael harlt rails教程,但是我收到了这个错误
Missing template layouts/mailer with {:locale=>[:en],:formats=>[:html],:variants=>[],:handlers=>[:raw,:erb,:html,:builder,:ruby,:coffee,:jbuilder]}. Searched in: * “/home/ubuntu/workspace/app/views”
预览帐户激活时
这是我的user_mailer.rb
class UserMailer < ApplicationMailer def account_activation(user) @user = user mail to: user.email,subject: "Account activation" end def password_reset @greeting = "Hi" mail to: "to@example.org" end end
mail to: user.email,subject: "Account activation"
我尝试在user_mailer.rb中添加layout’mailer’,但它不起作用.