View
<%= collection_select(@table, "sp", @pops, "col2", "col2", {:prompt => "Select one"}) %>
Controller
@pops = Table.find(:all, :conditions=>{:col1 => "xyz"}, :order=> 'col2', :select=> 'DISTINCT col2')
This is my existing code. I am collecting a values in a column2 and populating it. Existing populating values as (col2a,col2b,col2c)
Now, I wish to populate two columns col2 and col3 in a single collection_select. I wish to populate like (col2a[col3a],col2b[col3b],col2c[col3c]). Kindly give me the idea to populate two columns in single collection select