Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Got rid of some commented code.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@218 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information
jyurek committed Sep 13, 2007
1 parent 99bfd1f commit 6c56552
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
7 changes: 1 addition & 6 deletions lib/paperclip.rb
Expand Up @@ -492,12 +492,7 @@ def content_type

# 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.
Expand Down
26 changes: 0 additions & 26 deletions tasks/paperclip_tasks.rake
Expand Up @@ -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

0 comments on commit 6c56552

Please sign in to comment.