I have the following code:
members.select {|m| m.role.assignable?}.collect {|m| m.role}.sort
There are two tables: "roles" and "members". One role record may have
many foreign member records.
But in this case I get many same roles, I want to apply "distinct"
operation to make roles unique in results. How can I do this?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---