0

次のコードを使用してデフォルト値を取得しています

<%= f.collection_select :location_id, Location.all, :id, {:selected => session["location"]},:formatted_display, { prompt: true }, :required => true,  :class => 'chosen-select order_form' %>

上記を試してみると、次のエラーが表示されます。

wrong number of arguments (7 for 4..6)
4

1 に答える 1

1

これで試してください

<%= f.collection_select :location_id, Location.all, :id, :name,{ :prompt => true , :selected => session["location"]},  :class => 'chosen-select order_form'%>
于 2013-10-22T14:57:02.037 に答える