Browse files

Always enable digest and compile in the Rake task

  • Loading branch information...
1 parent 57dd60f commit 3f29342481112d217b2b99743b229cf8b52ff3bc @guilleiguaran guilleiguaran committed Aug 31, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 actionpack/lib/sprockets/assets.rake
@@ -13,8 +13,9 @@ namespace :assets do
# Ensure that action view is loaded and the appropriate sprockets hooks get executed
- # Always perform caching so that asset_path appends the timestamps to file references.
- Rails.application.config.action_controller.perform_caching = true
+ # Always calculate digests and compile files
+ Rails.application.config.assets.digest = true
+ Rails.application.config.assets.compile = true
config = Rails.application.config
env = Rails.application.assets

2 comments on commit 3f29342

josh commented on 3f29342 Aug 31, 2011

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


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.