diff options
author | Joshua Peek <josh@joshpeek.com> | 2011-03-22 16:24:01 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2011-03-22 16:24:01 -0500 |
commit | 8c26d0dba6538a29ae117e5f3dbf1dd2d569183d (patch) | |
tree | 4c46cada8e2ae7e51f367d4954905e6b2d7f46f1 | |
parent | 989103a2334648c5b63e51a9480bcc435283f559 (diff) | |
download | rails-8c26d0dba6538a29ae117e5f3dbf1dd2d569183d.tar.gz rails-8c26d0dba6538a29ae117e5f3dbf1dd2d569183d.tar.bz2 rails-8c26d0dba6538a29ae117e5f3dbf1dd2d569183d.zip |
Use sprockets precompile
-rw-r--r-- | railties/lib/rails/tasks/assets.rake | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/railties/lib/rails/tasks/assets.rake b/railties/lib/rails/tasks/assets.rake index b6604a49c2..63e49ad2de 100644 --- a/railties/lib/rails/tasks/assets.rake +++ b/railties/lib/rails/tasks/assets.rake @@ -1,14 +1,6 @@ namespace :assets do task :compile => :environment do - env = Rails.application.assets - - assets = Rails.root.join("public/assets") - assets.mkdir unless assets.exist? - - Rails.application.config.compile_assets.each do |path| - assets.join(path).open('w') do |f| - f.write env[path].to_s - end - end + assets = ENV['assets'].split(',') + Rails.application.assets.precompile(*assets) end end |