親切な仲間が私を助けてくれました:これが解決策です。
railscastに従って、ネストされたフォームフィールドの#view部分。
= javascript_include_tag 'simple_tooltip'
.nested-fields
= f.inputs :class => :data_table_format do
= f.input :client_id, :as => :hidden, :value => current_user.client_id
= f.input :extent_value, :label => "Extent", :input_html => {:class => 'nested_narrow_input'}
%li.select
= f.collection_select :extent_type_id, ExtentUnit.order(:value), :id, :value, {include_blank: true}, {:class => 'nested_drop_down_one_of_two'}
%li.select
= f.grouped_collection_select :extent_unit_id, ExtentUnit.order(:value), :extent_types, :value, :id, :value, {include_blank: true}, {:class => 'nested_drop_down_two_of_two'}
.links
= link_to_remove_association image_tag("#{static_root}/cross.png", {:class => :cross}), f
#application.jsまたはアセットパイプラインのどこか
$(document).ready(function(){
$(".nested_drop_down_two_of_two").each(function(i,v){
$(this).attr("data-content",$(this).html());
});
$(".nested_drop_down_one_of_two").live("change", function() {
selected_type = $(this).find("option:selected").text();
var content = $($(this).parent("li.select").next().find(".nested_drop_down_two_of_two").attr("data-content")).filter("[label='"+selected_type+"']").html()
$(this).parent("li").next().find(".nested_drop_down_two_of_two").html(content);
return true;
});
});