Displaying 1 result from an estimated 1 matches for "deliveries_f".
Did you mean:
deliveries
2011 Jul 25
1
3 models in a form.
...s_many :delivery_items
has_many :products, :through => :delivery_items
belongs_to :customer
class DeliveryItem < ActiveRecord::Base
belongs_to :delivery
belongs_to :product
I create a new delivery for customer x:
= simple_form_for @customer do |f|
= f.simple_fields_for :deliveries do |deliveries_f|
.block
.column.span-12
= deliveries_f.association :products, :multiple => true,
:selected => @products_selected_id,
:input_html => { :title => "-
Select product -" }, :label => false
= deliveries_f.input :notes
Deli...