Skip to content
This repository
Browse code

Merge pull request #2631 from dasch/refactor-sprockets

Refactor Sprockets::Helpers::RailsHelper#performing_caching?
  • Loading branch information...
commit 041f1c719257c313266dd4850aee9aeda2ea9eb0 2 parents aae5ebf + db181bd
Santiago Pastorino spastorino authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 actionpack/lib/sprockets/helpers/rails_helper.rb
9 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -139,9 +139,14 @@ def rewrite_extension(source, dir, ext)
139 139 end
140 140 end
141 141
142   - # When included in Sprockets::Context, we need to ask the top-level config as the controller is not available
143 142 def performing_caching?
144   - config.action_controller.present? ? config.action_controller.perform_caching : config.perform_caching
  143 + # When included in Sprockets::Context, we need to ask the
  144 + # top-level config as the controller is not available.
  145 + if config.action_controller.present?
  146 + config.action_controller.perform_caching
  147 + else
  148 + config.perform_caching
  149 + end
145 150 end
146 151 end
147 152 end

0 comments on commit 041f1c7

Please sign in to comment.
Something went wrong with that request. Please try again.