ruby-on-rails
  • select
  • 2011-08-04 154 views 0 likes 
    0

    我用Rails 3select_tag軌道3個參數錯誤的錯誤數量

    <%= select_tag :area_id, options_from_collection_for_select(@areas.sort_by(&:name)), {:onChange => remote_function(:with => "'filter_by='+value", :url =>{ :controller=>"encoder/members", :action=>"filter_schools" }) } %> 
    

    這select_tag但我一直得到錯誤「錯誤的參數數目(1 3)。」什麼可能是錯的?

    回答

    3

    問題出在options_from_collection_for_select,它至少需要3個參數。

    相關問題