Skip to content

Commit

Permalink
Merge pull request teeparham#4 from daflip/master
Browse files Browse the repository at this point in the history
fix: changing an image when using non :filesystem storage causes dimensions to be removed
  • Loading branch information
y8 committed Sep 10, 2011
2 parents 81d0373 + 8bd5e4d commit a703b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/paperclip-meta.rb
Expand Up @@ -5,7 +5,7 @@ class Attachment

# If attachment deleted - destroy meta data
def save
unless @queued_for_delete.empty?
if (not @queued_for_delete.empty?) and @queued_for_write.empty?
instance_write(:meta, ActiveSupport::Base64.encode64(Marshal.dump({}))) if instance.respond_to?(:"#{name}_meta=")
end
original_save
Expand Down Expand Up @@ -53,4 +53,4 @@ def meta_read(style, item)
end
end
end
end
end

0 comments on commit a703b94

Please sign in to comment.