I am trying to save images through nested model **model: Listing has_many:photos accepts_nested_attributes_for :photos, :allow_destroy => true
I am currently creating a form with some nested attributes. The relevant parts are that there is a Sale model (the master model for the form), a Vehicle model (sale has_one vehicle and vehicle belongs
It\'s my first time here, and first time I use nested_form gem. Everything seemed to be ok, but the data from my \"parent\" model doesn\'t save.
I am trying to set up a nested model form similar to the one in Ryan Bates\' Railscast Ep #196. My models are:
I have 3 Models: Location belongs_to :user has_many :products, :product_dates ProductDate belongs_to :user, :location
I know how to build the 2nd object in a controller but how do you build a third or a fourth? In my case i need to build 3.
I have 3 models: class DropShipOrderLineItem < ActiveRecord::Base belongs_to :drop_ship_order belongs_to :line_item
I currently have a form set up with nested models - all going according to plan so far. The form allows me to create a sale, and from that I can create a customer and a vehicle (separate models).
Here\'s the basic setup: I have an Order model. An Order has one Address and it accepts_nested_attributes_for :address.
I\'ve searched a lot and the common cause of this problem is attr_ascessible :model_attributes not being declared but I can\'t seem to get it working.