lib/bulldog/has_attachment.rb in bulldog-0.2.1 vs lib/bulldog/has_attachment.rb in bulldog-0.2.2

- old
+ new

@@ -124,9 +124,10 @@ end end def make_attachment_for(name, value) return Attachment.none(self, name) if value.nil? + return value.copy_for(self) if value.is_a?(Attachment::Maybe) stream = Stream.new(value) reflection = attachment_reflection_for(name) type = reflection.detect_attachment_type(self, stream) Attachment.of_type(type, self, name, stream) end