aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-28 16:58:34 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-28 16:58:34 -0300
commitf4b8b58f72cb50d329fb304201c07e8023efe32c (patch)
tree38843c00e063c6e593d4af322ea8795839c7f290 /actionview
parent7bc45df1823c3aa02afc56c850c07fe2e6c1b66c (diff)
parent20f6f646d130ed3ef28f3632a76ab2502ea3b209 (diff)
downloadrails-f4b8b58f72cb50d329fb304201c07e8023efe32c.tar.gz
rails-f4b8b58f72cb50d329fb304201c07e8023efe32c.tar.bz2
rails-f4b8b58f72cb50d329fb304201c07e8023efe32c.zip
Merge pull request #19941 from javan/actionmailer-cache-noop
Make ActionMailer #cache helper a no-op, not an exception
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/cache_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb
index 0e2a5f90f4..4fe21ca05b 100644
--- a/actionview/lib/action_view/helpers/cache_helper.rb
+++ b/actionview/lib/action_view/helpers/cache_helper.rb
@@ -134,7 +134,7 @@ module ActionView
#
# <%= render @notifications, cache: false %>
def cache(name = {}, options = nil, &block)
- if controller.perform_caching
+ if controller.respond_to?(:perform_caching) && controller.perform_caching
safe_concat(fragment_for(cache_fragment_name(name, options), options, &block))
else
yield