What's the way to clear not used assets?
asset-pipeline, rake, ruby-on-rails
Solution
Isn't the filename based on the md5 of the original file?
That means you could delete the whole directory, then run `rake assets:precompile` and since the contents of the files would be the same, you'd end up with the same filenames (with the same contents). So your `git status` would not notice those 'new' files since they are identical to the files already existing in its store. It would only notice that some files had been deleted.
Eg:
$ ls
application-<md5-old>.css
application-<md5-current>.css
$ rm *
$ rake assets:precompile
$ ls
application-<md5-current>.css
$ git status
deleted: application-<md5-old>.css
Problem
``` rake assets:precompile ``` creates new file like application-be2b8c92856ffacee861d9e9c2935e3e, but there's old one named application-c730047bc2a5cf3a706aa3a9f998ab77.css. It will be never used any more. Is there a way to clear out changed assets? I don't want to delete all assets dir, cause that seems like a overkill for all those files which are untouched (and it looks bad in git)