我正在使用Rails和Devise进行用户管理。我希望我所有的电子邮件是一致的样式和修改设计密码重置电子邮件。
reset_password_instructions.html.erb仅包含的内容。一定有它使用的布局,但我找不到...
发布于 2016-03-09 00:35:01
您可以使用初始化器为所有设计邮件定义布局。
config/initializer/devise.rb
Devise.setup do |config|
# Other options here...
config.to_prepare do
Devise::Mailer.layout "email" # email.haml or email.erb
end
endhttps://github.com/plataformatec/devise/wiki/How-To:-Create-custom-layouts
您必须使用在Devise::Mailer.layout中标识的名称创建一个新的电子邮件布局,但这是一件好事,因为现在您已经完全控制了代码。
https://stackoverflow.com/questions/35872698
复制相似问题