kbingman/paperclipped — Issue #42: Regenerate Thumbnails Fix in 0.9.1 Radiant and latest Paperclipped
Author: pjammer
Created: 2012-02-08 00:36:30+00:00
State: open

This is google bait, but the Regenerate Thumbnails button on any page, wasn't working for me. What fixed it was changing these lines of code in the lib/tasks/paperclip_tasks.rake file

```ruby
def for_all_attachments
obtain_class
names = obtain_attachments
ids = @klass.connection.select_values(@klass.send(:construct_finder_sql, :select => 'id'))

ids.each do |id|
instance = @klass.find(id)
names.each do |name|
result = if instance.send("#{ name }?")
yield(instance, name)
else
true
end
print result ? "." : "x"; $stdout.flush
end
end
puts " Done."
end
```

Will submit patch later, but it looks like it has never worked? Now it may not be fair, because when you dance with a heisenbug like I had, you change a lot of stuff, but it was this last change that worked for me. Hope it helps.