Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow :parent and :model options to be specified together #186

Open
shaug opened this issue Mar 25, 2018 · 0 comments
Open

Allow :parent and :model options to be specified together #186

shaug opened this issue Mar 25, 2018 · 0 comments

Comments

@shaug
Copy link

shaug commented Mar 25, 2018

This is the same underlying problem as the #183, but I don't think the model can always reliably be inferred from scope, so I didn't want to vote it for fear it might be further dismissed, even if the underlying issue is valid and solvable.

It is possible to specify a has_many with a class_name on a parent class, which is necessary when the name of the resulting accessor does not automatically map to the correct class name for the model.

As such, it seems decent_exposure should allow parent and model to both be specified. When the above configuration is used with the current code, the parent short-cut cannot be used (even though it would seem natural), because the model method in behavior.rb fails to automatically determine the correct model name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant