cache_digests icon indicating copy to clipboard operation
cache_digests copied to clipboard

ActionMailer undefined method `perform_caching'

Open firedev opened this issue 12 years ago • 2 comments

It is impossible to include a partial with cache into email to be sent using ActionMailer.

ActionView::Template::Error (undefined method `perform_caching' for #<ContactMailer:0x007f8dc14f5578>):
1: <% cache [object, admin?] do %>
...

So I have added a helper to the mailer:

helper_method :cache
def cache *args
  yield
end

But this seems a bit half-assed.

firedev avatar Jan 15 '13 17:01 firedev

https://github.com/nhocki/cache_digests/commit/ce2fe2531017b19b05b0115350367d31b8a8902d

scootklein avatar Oct 08 '13 18:10 scootklein

If using rails 4.2 look at https://github.com/rails/rails/issues/17657#issuecomment-71385191

viniciusnz avatar Jan 25 '15 18:01 viniciusnz