我正在使用 Rails 3.0、Ruby 1.9.2 和 Plataformatec simple_form gem。此代码适用于 form_for,但不适用于 simple_form_for:
<%= simple_form_for(@provider) do |f| %>
<% Car.all.each do |c| %>
<div>
<%= check_box_tag :car_ids, c.id, @store.cars.include?(c), :name => 'store[car_ids][]' %>
$<%= c.cost %> | <%= c.description %>
</div>
<% end %>
<div class="actions">
<%= f.submit "New" %>
</div>
<% end %>
如何让它与 simple_form_for 一起使用?
提前致谢!