Commit 0e1f0617 by Jon Yurek

paperclip:clean will check validations correctly now

parent c9834ef9
......@@ -44,6 +44,7 @@ namespace :paperclip do
desc "Cleans out invalid attachments. Useful after you've added new validations."
task :clean => :environment do
for_all_attachments do |instance, name|
instance.send(name).send(:validate)
if instance.valid?
true
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment