ber*_*kes 1 actionmailer ruby-on-rails-4
我在以下位置定义了一个助手ApplicationHelper:
module ApplicationHelper
def url_for_portal
URI("https://example.com/")
end
end
Run Code Online (Sandbox Code Playgroud)
并想在邮件模板中使用它,app/views/client_mailer/account_activation.md.erb但得到一个undefined method 'url_for_portal':
Activate your Example.com account by clicking on the link below:
[<%= url_for_portal %>](<%= url_for_portal %>)
Run Code Online (Sandbox Code Playgroud)
如何在邮件模板中编写和使用辅助方法?
| 归档时间: |
|
| 查看次数: |
1077 次 |
| 最近记录: |