mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #2631 from dasch/refactor-sprockets
Refactor Sprockets::Helpers::RailsHelper#performing_caching?
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user