У меня есть два выбора, второй - в соответствии со значением первого. Я использую CoffeScript.CoffeScript работает только после перезагрузки страницы в приложении Rails
\t \t <%= f.collection_select :type, RequestType.order(:typeName), :id, :typeName,
{include_blank:true }, {:class => "types"} %>
<%= f.grouped_collection_select :subtype, RequestType.order(:typeName),
:RequestSubTypes, :typeName, :request_type_id, :subTypeName,
{include_blank:true},
{:class => "subTypes" } %>
jQuery ->
\t subTypes = $(".subTypes").html()
\t $(".subTypes").parent().hide()
\t $(".types").change ->
\t \t type = $(".types :selected").text()
\t \t options = $(subTypes).filter("optgroup[label='#{type}']").html()
\t \t if options \t
\t \t \t $(".subTypes").html(options)
\t \t \t $(".subTypes").parent().show()
\t \t else
\t \t \t $(".subTypes").empty()
\t \t \t $(".subTypes").parent().hide()
<%= link_to "link", new_request_path %>
Второй вариант помог. Большое спасибо. – yerassyl