Topic: Posting Children and Grandchildren in one Form

I am working on a project for a printing company and am facing some unique challenges with a pricing grid.

For an example of what I am working towards, scroll down to the pricing tables and you will see that each product has different sizes and then those sizes have prices and quantities. The models for this are easy pie:

class Product < ActiveRecord::Base
  has_many :sizes

class Size < ActiveRecord::Base
  belongs_to :product
  has_many :prices

class Price < ActiveRecord::Base
#also includes field for quantity
  belongs_to :size

Where I end up scratching my head is in the controller and view. I found a plugin that deals elegantly with posting parent and a dynamic number of children: … ist-plugin

But I am at a loss as to the best way to also post grandchildren like this.

Before I rip apart this plugin to suit my needs, I was curious what yall think of this solution.

Am I on the right path, or am I overcomplicating things?