Permalink
Browse files

Merge pull request #2631 from dasch/refactor-sprockets

Refactor Sprockets::Helpers::RailsHelper#performing_caching?
  • Loading branch information...
2 parents aae5ebf + db181bd commit 041f1c719257c313266dd4850aee9aeda2ea9eb0 @spastorino spastorino committed Aug 22, 2011
Showing with 7 additions and 2 deletions.
  1. +7 −2 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -139,9 +139,14 @@ def rewrite_extension(source, dir, ext)
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

0 comments on commit 041f1c7

Please sign in to comment.