Permalink
Browse files

rename task and Rake::FileList used

  • Loading branch information...
1 parent 9d10c2a commit 008a0ecdb13642b6761b5d8b3bb6ce4c4eb0899a @vishnuatrai vishnuatrai committed May 27, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/rails/tasks/assets.rake
@@ -11,10 +11,10 @@ namespace :assets do
end
desc "Remove compiled assets"
- task :cleanup => :environment do
+ task :clean => :environment do
assets = Rails.application.config.assets
public_asset_path = Rails.public_path + assets.prefix
- FileUtils.rm_r Dir.glob("#{public_asset_path}/*.js")
- FileUtils.rm_r Dir.glob("#{public_asset_path}/*.css")
+ file_list = FileList.new("#{public_asset_path}/*.js", "#{public_asset_path}/*.css")
+ file_list.each{ |list| FileUtils.rm list }
end
end

0 comments on commit 008a0ec

Please sign in to comment.