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