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, http://www.fatratpress.com/cards/ 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
end

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

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


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:

http://www.cottee.org/articles/2006/06/ … 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?