具有grouped_collection_select的条件

时间:2013-05-05 09:36:05

标签: ruby-on-rails-3

我想用我的产品展示groups_collection_select(产品链接到一个类别)所以我这样做了:

<%= c.grouped_collection_select :product_id, @categories, :products, :name, :id, :combined_name, :include_blank => true %>

但我只想要一些布尔值为“true”的产品,是否有可能指定这个?我知道@categories有可能但我不知道:产品......

由于

0 个答案:

没有答案