ruby-on-rails – 缺少带有{:locale => [:en],:formats =&
发布时间:2020-12-17 04:26:47 所属栏目:百科 来源:网络整理
导读:我正在关注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
我正在关注michael harlt rails教程,但是我收到了这个错误
预览帐户激活时 这是我的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’,但它不起作用. 编辑: The screenshot of my folders 解决方法
如果您还没有,则需要名为user_mailer的视图中的文件夹,并且您需要为每个方法(account_activation.html.erb& password_reset.html.erb)提供一个文件.这是您的电子邮件模板的位置.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 兼容系列-JSON.parse()转字符串为json对象,解决IE7及以下不
- c – string :: insert中不同返回类型背后的原因是什么?
- 移植U-Boot-2008.10到友善之臂mini2440(三)
- iphone – AVCapture appendSampleBuffer
- c# – 使用dateTimePicker在DataGridView中的可编辑日期
- 6大设计原则之里氏替换原则
- Cocos2d-x学习笔记(十)—— 音频系统(SimpleAudioEngine
- [下载] M20PXX 系列 SPI Flash datasheet
- dart – 以编程方式关注InputField并打开键盘
- Postgresql 游标使用