lib/bulldog/has_attachment.rb in bulldog-0.0.4 vs lib/bulldog/has_attachment.rb in bulldog-0.0.5

- old
+ new

@@ -122,10 +122,13 @@ end end end def clear_original_attachments - remove_instance_variable :@original_attachments + # Somehow this can be unset sometimes. TODO: Work out how. + if instance_variable_defined?(:@original_attachments) + remove_instance_variable :@original_attachments + end end def process_attachments_for_event(event, *args) self.class.attachment_reflections.each do |name, reflection| _attachment_for(reflection.name).process(event, *args)