both the old version and this one don't work with inheritance because the polymorphic association will use the `class.parent_name` instead of `class.name`