search for: company_category_id

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

2006 May 11
6
ActiveRecord associations
Can someone clarify this for me? Suppose I have two tables like: class Company < ActiveRecord::Base belongs_to :category end class Category < ActiveRecord::Base has_many :companies end I understand that the belongs_to causes related companies to be read from the db when I ask for a category. I suspect SQL something like select * from categories, companies where category.id