I have the following associations in my models:
item.rb
belongs_to :manufacturer, :class_name = Company
belongs_to :distributor, :class_name = Company
company.rb
has_many :items
My question: what is the best way to find all of the items belonging to
a specific company?
If I call Company.items
On 4 October 2011 21:35, Jim Burgess li...@ruby-forum.com wrote:
I have the following associations in my models:
item.rb
belongs_to :manufacturer, :class_name = Company
belongs_to :distributor, :class_name = Company
company.rb
has_many :items
My question: what is the best way to find all
On 4 October 2011 21:40, Colin Law clan...@googlemail.com wrote:
On 4 October 2011 21:35, Jim Burgess li...@ruby-forum.com wrote:
I have the following associations in my models:
item.rb
belongs_to :manufacturer, :class_name = Company
belongs_to :distributor, :class_name = Company
Trying again.
On 4 October 2011 21:44, Colin Law clan...@googlemail.com wrote:
On 4 October 2011 21:40, Colin Law clan...@googlemail.com wrote:
On 4 October 2011 21:35, Jim Burgess li...@ruby-forum.com wrote:
I have the following associations in my models:
item.rb
belongs_to :manufacturer,
4 matches
Mail list logo