Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.
This repository was 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

@pjammer

Description

@pjammer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions