我想選擇一個SuperCategory,然後過濾掉MainCategories的下拉菜單。我收到以下錯誤動態選擇菜單
未定義的方法`圖」:main_categories:符號
與代碼
<%= select_tag 'main_category_id', grouped_collection_select(:main_category_id, SuperCategory.active.order(:title), :main_categories, :title, :id, :title, include_blank: false) %>
工作你是說你想有兩個選擇?第二選擇中的值取決於第一選擇中選擇的值? –