I have three tables: the products, type_products, properties and value.
**Typeproduct.rb**
has_many :products has_many :properties
**Property.rb**
belongs_to :type_product has_many :values
**Value.rb**
belongs_to :property
**Product.rb**
belongs_to :type_product
What a best way to generate a form based on the conditions and values, when client changing the type_products in the form