What is the way to clear unused assets?

rake assets:precompile

creates a new file, for example application-be2b8c92856ffacee861d9e9c2935e3e, but there is an old one called application-c730047bc2a5cf3a706aa3a9f998ab77.css. It will never be used again. Is there a way to clear changed assets? I don't want to remove all dir attributes because it seems redundant for all those files that are untouched (and it looks bad in git)

+5
source share
2 answers

Is the file name based on the md5 source file?

, , rake assets:precompile, , ( ). , git status "" , , . , .

:

$ 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
+2

, -, , , . , , . HTML , , . , , HTML (, , memcaching), . - , , .

, , . , brake assets:clean, , , . , 2 .

"2" 0, . , , , . , , .

+2

All Articles