What exactly are you trying to do?

>From reading what you wrote, it sounds like you want a list of roles
that have not already been assigned.  Is that right?

--
James Mitchell



On Fri, Nov 21, 2008 at 8:59 AM, Yan Oleg
<[EMAIL PROTECTED]> wrote:
>
> Yan Oleg wrote:
>> 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?
>
> Please help me!
> --
> 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 rubyonrails-talk@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to