module ActiveFedora::AutosaveAssociation

def before_save_collection_association

association whether or not the parent was a new record before saving.
Is used as a before_save callback to check while saving a collection
def before_save_collection_association
  @new_record_before_save = new_record?
  true
end