Hah, sorry about that. If it makes you feel any better, I broke
Lighthouse too
For now, you can just hack your model like so:
def partitioned_path(*args)
[attachment_path_id] + args
end
I did a manual migration looping through all the records and moving
them manually. This isn't the exact code, but something like this
should work.
class Avatar
def old_full_filename(thumbnail = nil)
file_system_path = (thumbnail ? thumbnail_class :
self).attachment_options[:path_prefix].to_s
File.join(RAILS_ROOT, file_system_path, attachment_path_id.to_s,
thumbnail_name_for(thumbnail))
end
Avatar.find(:all).each do |av|
next unless File.exist?(av.old_full_filename)
FileUtils.mkdir_p(File.dirname(av.full_filename))
File.move av.old_full_filename, av.full_filename
end