Has anyone tried creating proxies in their association extensions?
For example, Jamis talks about extensions here - http://
There's an 'active' method, which returns the results of a find
operation. But say I need to count those active items. I could add a
count_active method... but it seems like it would be much cleaner if
the active method returned an association proxy. That way, a simple
project.tasks.active could be queried for the full range of proxy
methods - eg project.tasks.active.count, or
The association proxy setup code is making my head spin right now, so
I haven't tried it - has anyone else?