Currently if I have:
expose :thing, parent: :current_user
# equivalent to:
expose :thing, scope: ->{ current_user.things }
thing needs to have the model class Thing or things blow up. We can't use the :model configuration with :parent because apparently that doesn't make sense so we're forced to use the more verbose :scope method instead in order to additionally override the :model.
In more complicated systems sometimes the model class name is not the same as the the relationship name. Is it conceivable that we could better infer the model name directly from the scope? Do you think this is a good idea?
Currently if I have:
thingneeds to have the model classThingor things blow up. We can't use the:modelconfiguration with:parentbecause apparently that doesn't make sense so we're forced to use the more verbose:scopemethod instead in order to additionally override the:model.In more complicated systems sometimes the model class name is not the same as the the relationship name. Is it conceivable that we could better infer the model name directly from the scope? Do you think this is a good idea?