Skip to content
This repository
Browse code

Always enable digest and compile in the Rake task

  • Loading branch information...
commit 3f29342481112d217b2b99743b229cf8b52ff3bc 1 parent 57dd60f
Guillermo Iguaran authored August 31, 2011

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  actionpack/lib/sprockets/assets.rake
5  actionpack/lib/sprockets/assets.rake
@@ -13,8 +13,9 @@ namespace :assets do
13 13
       # Ensure that action view is loaded and the appropriate sprockets hooks get executed
14 14
       ActionView::Base
15 15
 
16  
-      # Always perform caching so that asset_path appends the timestamps to file references.
17  
-      Rails.application.config.action_controller.perform_caching = true
  16
+      # Always calculate digests and compile files
  17
+      Rails.application.config.assets.digest = true
  18
+      Rails.application.config.assets.compile = true
18 19
 
19 20
       config = Rails.application.config
20 21
       env    = Rails.application.assets

2 notes on commit 3f29342

Joshua Peek
Collaborator

I don't see why we need this. Sounds like people aren't running the precompile task with RAILS_ENV=production.

Guillermo Iguaran

config.assets.digest isn't necessary since is default to true for production env but config.assets.compile is false by default for production env and it's causing problem to some users that are using erb to get assets url inside css and js files. See #2765

Please sign in to comment.
Something went wrong with that request. Please try again.