[Rails] Find, .map and Distinct

Randal
2006-07-19T18:08:39Z

@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?

--
Posted via http://www.ruby-forum.com/.