-
Notifications
You must be signed in to change notification settings - Fork 115
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
Namespace conflict with model methods #112
Comments
I have a similar but different name collision: some of my models already implement a |
@davidcelis There's also the issue that if a ratable class is within a module, e.g. |
I completely forgot about that issue! 😳 |
My
User
modelrecommends :places
, but it already has an Active Record association forrecommended_places
, so I am forced to access Recommendable recommendations via:... which is a bit clunky. To avoid this, and other potential namespace collisions for existing model methods, I suggest supporting an optional
recommendable_
prefix on Recommendable finder methods, e.g.:Would be easy to implement -- we'd just need to add an optional check in the method regexes for the namespace. Existing finder methods would still work -- you'd only need to prepend recommendable_ if you had a namespace issue.
The text was updated successfully, but these errors were encountered: