I am trying to create a drop down menu and assign an onchange event on it in rails3. how would I do that.
<select name="" class="wy_inputs_selects sround">
<% @domains.each do |record| %>
<option value="<%= record.name %>.<%= record.tld %>" ><%= record.name %>.<%= record.tld %></option>
<%end%>
</select>
I am converting the above code into ruby like
<%= select_tag "",:class=>'wy_inputs_selects sround',options_from_collection_for_select(@domains,"name",
But I am stuck with how to get the record.tld and record.name using the above format