I have a select field and I want to put a custom attribute at it called name, I tried to do it like that:
<%= f.association :in_charge, :collection => User.lawyer.map{ |l| [l.name, l.id, {:name => l.name.downcase}] } %>
It works and generates the extra attribute but there is a problem, the select value attribute get changed to the model name attribute, in this case l.name. I changed places and put l.id first but the id attribute is displayed, they get duplicated, any idea why that happens?
Is there another way to define custom attributes at associations select fields?