lib/attached/attachment.rb in attached-0.2.6 vs lib/attached/attachment.rb in attached-0.2.7
- old
+ new
@@ -137,17 +137,17 @@
#
# Usage:
#
# @object.avatar.save
- def save
- self.purge.each do |path|
- self.storage.destroy(path)
- end
-
+ def save
self.queue.each do |style, file|
path = self.path(style)
self.storage.save(file, path) if file and path
+ end
+
+ self.purge.each do |path|
+ self.storage.destroy(path)
end
@purge = []
@queue = {}
end
\ No newline at end of file