Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactor Sprockets::Helpers::RailsHelper#performing_caching?

No need for them lines to get so long! Also, move that comment into
the method body where it belongs!
  • Loading branch information...
commit db181bddb646ff22c85218072ba5c69ca680dabd 1 parent aae5ebf
@dasch authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 actionpack/lib/sprockets/helpers/rails_helper.rb
View
9 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
Please sign in to comment.
Something went wrong with that request. Please try again.