3
限制選項我有一個簡單的形式與所述代碼:簡單形式的關聯輸入:由條件
<%= simple_form_for @business, :html => {:class => "form-inline"} do |f| %>
<%= f.association :business_type, :as => :collection_select, :input_html => {:class => "input-small"}, :label => "Type of Business"%>
<%= f.button :submit, :class => "primary pull-left" %>
<% end %>
在business type
模型中,我有以下:first_tier,second_tier,third_tier。
我希望選擇允許用戶選擇business type
模型中的所有選項,除first_tier選項外,但無法使其工作。
謝謝。
剛剛用compare語句編輯了你的答案。 – noob 2013-03-06 23:06:13