[Nitro] 0.26.0 preview

George Moschovitis george.moschovitis at gmail.com
Thu Dec 15 10:05:39 EST 2005


> Project has_many Group
> Group has_many User
>
> project.groups.users
> ???

try this:

project.groups.inject([]) { |acc, g| acc << g.users }

perhaps Trans can add a facets enumerator helper like this:

project.groups.injector.users

regards,
George.


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list