Commit 6c56552b by jyurek

Got rid of some commented code.

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@218 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
parent 99bfd1fb
......@@ -492,12 +492,7 @@ module Thoughtbot #:nodoc:
# Returns the file's normal name.
def original_filename
@original_filename ||= self.path
end
# In case we need to override the name, like in the case of refreshing.
def original_filename= name
@original_filename = name
self.path
end
# Returns the size of the file.
......
......@@ -24,36 +24,10 @@ namespace :paperclip do
puts "Regenerating thumbnails for #{instances.length} instances:"
instances.each do |instance|
names.each do |name|
# original_file = instance.send("#{name}_file_name", :original)
# next if original_file.blank?
# original_name = instance["#{name}_file_name"]
# file = File.new(original_file)
# file.original_filename = original_name
# instance.send("#{name}=", file)
instance.send("process_#{name}_thumbnails")
end
print instance.save ? "." : "x"; $stdout.flush
end
puts " Done."
end
# desc "Cleans out unused attachments for the given CLASS (and optional ATTACHMENT)"
# task :clean do
# klass = obtain_class
# instances = klass.find(:all)
# names = obtain_attachments
#
# puts "Finding thumbnails for #{instances.length} instances:"
# files = instances.map do |instance|
# names.map do |name|
# styles = instance.attachment(name)[:thumbnails].keys
# styles << :original
# styles.map do |style|
# instance.send("#{name}_file_name", style)
# end
# end
# end
#
# pp files
# end
end
\ No newline at end of file
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