Skip to content

Instantly share code, notes, and snippets.

@gamov
Created September 3, 2012 03:48
Show Gist options
  • Save gamov/3606615 to your computer and use it in GitHub Desktop.
Save gamov/3606615 to your computer and use it in GitHub Desktop.
Rails nested builds
class Shipment < ActiveRecord::Base
has_many :shipping_items
end
class ShippingItem < ActiveRecord::Base
belongs_to :shipment
has_many :container_allocations
end
class ContainerAllocation < ActiveRecord::Base
belongs_to shipping_item
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment