I am working on ruby on rails project and I need to show the id and name of option in dropdown. I tried with the following code but its showing on the name of the field.
select_tag "select", options_for_select(@subject.map{ |u| [u.altername, u.id] }), :multiple => true
English(457865) Math(7895452)
Like this, I want to show