Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assets:clean task now cleans up images #1776

Merged
merged 1 commit into from
Jun 20, 2011
Merged

Conversation

jamesarosen
Copy link
Contributor

rake assets:clean will now clean up any image files (*.png, *.gif, *.jpg, *.jpeg, *.ico) in addition to CSS and JS.

@jamesarosen
Copy link
Contributor Author

Pull request updated as per #1355 (comment)

josh added a commit that referenced this pull request Jun 20, 2011
assets:clean task now cleans up images
@josh josh merged commit 2df2bfd into rails:master Jun 20, 2011
@jamesarosen
Copy link
Contributor Author

Just noticed a slight flaw: if there are subdirectories in public/assets/, you get an Operation not permitted. Either of the following fixes it:

rm file unless File.directory?(file)

or

rm file, :force => true

@josh
Copy link
Contributor

josh commented Jun 20, 2011

Yeah, we need :force to remove the dirs too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants