मैं निम्नलिखित रूपों का सरल रूप से अनुवाद कैसे करूं?रेल 4 simple_form collection_select
<%= form_for(@bill) do |f| %>
<%= f.label :location_id %>
<%= f.collection_select(:location_id, @locations, :id, :location_name,
{:selected => @bill.location_id}) %>
मैं एक साधारण एसोसिएशन का उपयोग नहीं कर सकता क्योंकि @ लोकेशन कहां से पूछताछ का परिणाम है।
अतिरिक्त "संग्रह:" को हटाने के बाद काम करता है, सिवाय इसके कि यह एक रिक्त जोड़ता है जिसे मैं नहीं चाहता हूं। – markhorrocks
@markhorrocks 'include_blank => false' नामक एक विकल्प है, इसे अभी जोड़ें – Viren
@markhorrocks' include_blank => false' विकल्प – Viren