search for: partapplication

Displaying 1 result from an estimated 1 matches for "partapplication".

Did you mean: astapplication
2005 Mar 02
0
Using a params from down the model relationship tree
Hi, I have three models: class Product < ActiveRecord::Base has_many :parts end class Part < ActiveRecord::Base has_many :part_applications belongs_to :product end class PartApplication < ActiveRecord::Base belongs_to :part end In a controller, I have access to a Product.id: @product = Product.find(@params[''id'']) So with that I am able to do something like this: @product.parts.each do |part| part.part_applications.each do |app| end end But what I wo...