0
這裏是我的路線:的ActionController :: RoutingError自動完成區域內未初始化常數(導軌)
match '/goods_ins/autocomplete/autocomplete_supplier_suppliername', :controller => 'goods_ins'
match '/goods_ins/autocomplete/autocomplete_partcode_partcode', :controller => 'goods_ins'
get 'autocomplete_partcode_partcode', :controller => 'goods_ins'
get 'autocomplete_supplier_suppliername', :controller => 'goods_ins'
,這是我的自動填充字段:
<div class="field">
<%= f.label "Supplier Name" %><br />
<%=f.autocomplete_field :suppliername, :autocomplete => autocomplete_supplier_suppliername_path %>
</div>
當我到外地輸入的東西,我得到這個錯誤終端:
ActionController :: RoutingError(未初始化的常量GoodsIns):
是的,我有這兩個,我有一個窗體,其中兩個字段需要啓用自兩個不同的表中的數據啓用自動完成。這些字段是供應商名稱和零件代碼。這些表格被稱爲供應商和零件代碼。我遵循這個文檔:https://github.com/crowdint/rails3-jquery-autocomplete –