Hi Everyone,
I have a select list in my model which lists a persons name with their employers name:
<li>Case Handler Name<span><%= f.select :person_id, Person.all.collect { |x| [x.name_and_company, x.id] } %></span></li>
def name_and_company
return "#{personname} (#{company})"
end
Is it possible to force the select list to output in alphabetical order?
I am assuming I would put an order tag in there...somewhere?
(:order => 'personname DESC')
Thanks,
Danny