开发者

Using helpers in ActionMailer

开发者 https://www.devze.com 2023-03-04 19:05 出处:网络
How do I access helpers within ActionMailer from ones I have created? I have tried: How to use my view helpers in my ActionMailer views? for my own created h开发者_如何学运维elper but didn\'t work. A

How do I access helpers within ActionMailer from ones I have created?

I have tried: How to use my view helpers in my ActionMailer views? for my own created h开发者_如何学运维elper but didn't work. Any advise?


This has worked for me in the past in Rails 3:

class OrderMailer < ActionMailer::Base
  helper :application, :orders, :products
  ...
end

My custom helpers are obviously orders and products.

0

精彩评论

暂无评论...
验证码 换一张
取 消