I have 3 tables: - users - groups - groups_users (link the two table) For recovery the groups linked to the user i use the command user.groups but i wont also a way to recovery all the groups where is non present the userin question. I don''t know the way to solve this problem with the elegance of rails. Thanks.
On Apr 30, 2005, at 8:12 AM, Regi wrote:> I have 3 tables: > - users > - groups > - groups_users (link the two table) > > For recovery the groups linked to the user i use the command > user.groups but i > wont also a way to recovery all the groups where is non present the > userin > question. > I don''t know the way to solve this problem with the elegance of rails. > Thanks.A custom sql query would be faster, but: Group.find(:all) - user.groups jeremy