removed previous fix because it wasnt needed, updated to use self.class.attachment_definitions