My User model recommends :places, but it already has an Active Record association for recommended_places, so I am forced to access Recommendable recommendations via:
user.send :recommended_for, Place
... 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.:
user.recommendable_recommended_places
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.
My
Usermodelrecommends :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.