diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-22 08:11:35 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-22 08:11:35 -0700 |
commit | 041f1c719257c313266dd4850aee9aeda2ea9eb0 (patch) | |
tree | 2ace9e399797b4bfbf668d7bd04461f119713f52 /actionpack/lib | |
parent | aae5ebf3eb7d17e668bb05f9c859e239f31b9f50 (diff) | |
parent | db181bddb646ff22c85218072ba5c69ca680dabd (diff) | |
download | rails-041f1c719257c313266dd4850aee9aeda2ea9eb0.tar.gz rails-041f1c719257c313266dd4850aee9aeda2ea9eb0.tar.bz2 rails-041f1c719257c313266dd4850aee9aeda2ea9eb0.zip |
Merge pull request #2631 from dasch/refactor-sprockets
Refactor Sprockets::Helpers::RailsHelper#performing_caching?
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/sprockets/helpers/rails_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb index 69306ef631..cb01532449 100644 --- a/actionpack/lib/sprockets/helpers/rails_helper.rb +++ b/actionpack/lib/sprockets/helpers/rails_helper.rb @@ -139,9 +139,14 @@ module Sprockets end end - # When included in Sprockets::Context, we need to ask the top-level config as the controller is not available def performing_caching? - config.action_controller.present? ? config.action_controller.perform_caching : config.perform_caching + # When included in Sprockets::Context, we need to ask the + # top-level config as the controller is not available. + if config.action_controller.present? + config.action_controller.perform_caching + else + config.perform_caching + end end end end |