I am using collection_select to get a list of manufacturers and then I am using related_collection_select to list items produced by the selected manufacturer. I get the error message: "$ is not Defined" in the error console of firefox.
When looking at the page source the related_collection_select collection is producing a correct list of items for all manufacturers but based on the selection of manufacturer it cannot extract the list of items for that manufacturer.
<%= collection_select :manufacturer, :id, Manufacturer.findall, :select => "manufacturers.id, manufacturers.name", rder => "name"), :id, :name, {rompt => ""} %>
<%= related_collection_select :item, :id, [:manufacturer, :id], Item.find_by_sql("SELECT items.* FROM items LEFT JOIN item_sort_options ON items.id = item_sort_options.item_id ORDER BY position"), :id, :label, :manufacturer_id, { }, { :style => "width: 300px" } %>
When looking at the page source the related_collection_select collection is producing a correct list of items for all manufacturers but based on the selection of manufacturer it cannot extract the list of items for that manufacturer.
<%= collection_select :manufacturer, :id, Manufacturer.findall, :select => "manufacturers.id, manufacturers.name", rder => "name"), :id, :name, {rompt => ""} %>
<%= related_collection_select :item, :id, [:manufacturer, :id], Item.find_by_sql("SELECT items.* FROM items LEFT JOIN item_sort_options ON items.id = item_sort_options.item_id ORDER BY position"), :id, :label, :manufacturer_id, { }, { :style => "width: 300px" } %>