Skip to content

Commit

Permalink
namespacenuti vypisu
Browse files Browse the repository at this point in the history
  • Loading branch information
vsalbaba committed Mar 8, 2012
1 parent 3d281ac commit a36d25c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/paperclipdb/storage/database.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def override_default_options(base)
private :override_default_options private :override_default_options


def exists?(style = default_style) def exists?(style = default_style)
puts("exists? #{style}") puts("[paperclipdb] exists? #{style}")
return getAttachment(path(style)).nil? return getAttachment(path(style)).nil?
end end


Expand All @@ -25,7 +25,7 @@ def getAttachment(file_path)
end end


def to_file style = default_style def to_file style = default_style
puts("to_file #{style}") puts("[paperclipdb] to_file #{style}")
if @queued_for_write[style] if @queued_for_write[style]
@queued_for_write[style] @queued_for_write[style]
elsif exists?(style) elsif exists?(style)
Expand All @@ -39,9 +39,9 @@ def to_file style = default_style
end end


def flush_writes def flush_writes
puts("[paperclip] Writing files #{@queued_for_write.count}") puts("[paperclipdb] Writing files #{@queued_for_write.count}")
@queued_for_write.each do |style, file| @queued_for_write.each do |style, file|
puts("[paperclip] Writing files for #{file} #{style}") puts("[paperclipdb] Writing files for #{file} #{style}")
attachment = Paperclipdb::Attachment.new attachment = Paperclipdb::Attachment.new
attachment.base_name = File.basename(path(style)) attachment.base_name = File.basename(path(style))
attachment.dir_name = File.dirname(path(style)) attachment.dir_name = File.dirname(path(style))
Expand All @@ -55,7 +55,7 @@ def flush_writes


def flush_deletes def flush_deletes
@queued_for_delete.each do |path| @queued_for_delete.each do |path|
puts("[paperclip] Deleting files for #{path}") puts("[paperclipdb] Deleting files for #{path}")
attachment = getAttachment(path) attachment = getAttachment(path)
if (!attachment.nil?) if (!attachment.nil?)
attachment.destroy attachment.destroy
Expand Down

0 comments on commit a36d25c

Please sign in to comment.