Find, .map and Distinct

@rate_types = PerformerCategoryRate.find( :all,
:conditions => [
“performer_category_id = ?”,
@calc_sheet_performer_line.performer_category.id ],
:select => “DISTINCT
rate_type_id, min(id)”,
:group => “rate_type_id” ).map
{ |pc| [pc.rate_type.name, pc.id ] }

I’m sure it’s something simple, but when I use the above command, and
assign @rate_types to a select group, the value is not set on the items,
however the name is.

Anyone know what I’m doing wrong?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs