Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Sprockets::Helpers::RailsHelper#performing_caching? #2631

Merged
merged 1 commit into from Aug 22, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions actionpack/lib/sprockets/helpers/rails_helper.rb
Expand Up @@ -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
Expand Down