diff options
author | Joshua Peek <josh@joshpeek.com> | 2011-08-21 16:42:06 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2011-08-21 16:42:06 -0500 |
commit | 63d3809e31cc9c0ed3b2e30617310407ae614fd4 (patch) | |
tree | 77cf65556f78e1cbcd6b815f1f2d426f3f2dd455 /actionpack/lib/sprockets/assets.rake | |
parent | f25d65d2fbe2a0e65affdb87c2a27f47dbe80a09 (diff) | |
download | rails-63d3809e31cc9c0ed3b2e30617310407ae614fd4.tar.gz rails-63d3809e31cc9c0ed3b2e30617310407ae614fd4.tar.bz2 rails-63d3809e31cc9c0ed3b2e30617310407ae614fd4.zip |
Fix sprockets warnings
Fixes #2598
Diffstat (limited to 'actionpack/lib/sprockets/assets.rake')
-rw-r--r-- | actionpack/lib/sprockets/assets.rake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake index 4cf5caab91..acf2f256c2 100644 --- a/actionpack/lib/sprockets/assets.rake +++ b/actionpack/lib/sprockets/assets.rake @@ -13,17 +13,20 @@ namespace :assets do # Ensure that action view is loaded and the appropriate sprockets hooks get executed ActionView::Base - assets = Rails.application.config.assets.precompile # Always perform caching so that asset_path appends the timestamps to file references. Rails.application.config.action_controller.perform_caching = true + + config = Rails.application.config + assets = config.assets.precompile.dup + assets << {:to => File.join(Rails.public_path, config.assets.prefix)} Rails.application.assets.precompile(*assets) end end desc "Remove compiled assets" task :clean => [:environment, 'tmp:cache:clear'] do - assets = Rails.application.config.assets - public_asset_path = Rails.public_path + assets.prefix + config = Rails.application.config + public_asset_path = File.join(Rails.public_path, config.assets.prefix) rm_rf public_asset_path, :secure => true end end |