search for: selected_group

Displaying 1 result from an estimated 1 matches for "selected_group".

Did you mean: select_group
2005 Dec 14
0
how to get these records in has_and_belongs_to_many relation
...n those who are in the group. (is cooler than 2 oldschool selectlists ;) ) these are my users: in group: Luc not in group: Nick, Glenn, Andy for the second colum i got this in my controller: @group_users = Group.find(:first, :conditions =>[''firm_id = ? and id = ?'', @firm_id, @selected_group]).users and in rhtml: <% for user in @group_users %> <%= user.first_name %> <br/> <% end %> the output it get: Luc (this is correct for the user who are in the group) Bur now: who do i get the users Nick, Glenn and Andy??? Thanks in advance