mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #2889 from guilleiguaran/perform-caching-assets
config.action_controller.perform_caching isn't used anymore in asset pipeline
This commit is contained in:
commit
1e61f2603c
2 changed files with 10 additions and 1 deletions
|
@ -71,7 +71,7 @@ module Sprockets
|
|||
mount app.assets => config.assets.prefix
|
||||
end
|
||||
|
||||
if config.action_controller.perform_caching
|
||||
if config.assets.digest
|
||||
app.assets = app.assets.index
|
||||
end
|
||||
end
|
||||
|
|
|
@ -64,6 +64,15 @@ module ApplicationTests
|
|||
end
|
||||
end
|
||||
|
||||
test "asset pipeline should use a Sprockets::Index when config.assets.digest is true" do
|
||||
app_file "config/initializers/digest.rb", "Rails.application.config.assets.digest = true"
|
||||
app_file "config/initializers/caching.rb", "Rails.application.config.action_controller.perform_caching = false"
|
||||
ENV["RAILS_ENV"] = "production"
|
||||
require "#{app_path}/config/environment"
|
||||
|
||||
assert_equal Sprockets::Index, Rails.application.assets.class
|
||||
end
|
||||
|
||||
test "precompile creates a manifest file with all the assets listed" do
|
||||
app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>"
|
||||
app_file "app/assets/javascripts/application.js", "alert();"
|
||||
|
|
Loading…
Reference in a new issue