Refactor.
Another refactor.
Look up the proper database for the object type.
Why is this inspecting a private member?
Looks like slugging should be a database-specific activity.
No need to slug those AR models.
Set the slug on AR models, but what should the slug be?
The slug should be the object type + id.
Look up AR models according to a custom slug.
Avoid AR model name conflicts by using type-id as a slug, instead of type_id.