Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Regenerate Thumbnails Fix in 0.9.1 Radiant and latest Paperclipped [FIXED] #42

Open
pjammer opened this issue Feb 8, 2012 · 0 comments

Comments

@pjammer
Copy link

pjammer commented Feb 8, 2012

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

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.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant