replaced self.base_class with ancestry_scoped