<%= f.select :report_ids, @reports.map { |r| ["#{r.name}
#{r.surname}", r.id] } , {}, :multiple => true, :size => 10 %>- Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Mon, Aug 24, 2009 at 5:57 AM, Aldo Italo<[email protected]> wrote: > > hi, > i have a collection_select helper wich i retrieve a select multiple with > the names of my reports: > > <%= f.collection_select :report_ids, @reports, :id, :name, {}, { > :multiple => true, :size => 10 } %> > > > but now i want to add the "surname" field to the list selectable. > i have tryed: > > <%= f.collection_select :report_ids, @reports, :id, "#{:name} > #{:surname}" , {}, { :multiple => true, :size => 10 } %> > > but i obtain an error. > what is the correct sintax? > > thanks > -- > 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 -~----------~----~----~----~------~----~------~--~---

