[Rails] Join types

2010-06-09 Thread JohnnyC
I'm sure this is not a new topic -- I've read mention of it elsewhere -- but in addition to :joins => :profile, Active Record also needs :inner_joins => :profile, :outer_joins => :profile, :left_joins => :profile, and all the popular combinations of join types. I've got a sqlite development enviro

[Rails] Re: Joining multiple tables ActiveRecord

2010-05-05 Thread JohnnyC
Thanks Fred. On May 4, 11:31 am, Frederick Cheung wrote: > On May 4, 5:42 pm, JohnnyC wrote: > > > > > I'd like to retrieve those services whose products have overruns > > defined for them, and can do so by joining them with sql (no inner > > join) to restrict

[Rails] Joining multiple tables ActiveRecord

2010-05-04 Thread JohnnyC
I have 3 tables as such: Products (has many product_overruns, has many services) *id Product_Overruns (belongs to product) *product_id Services (Active Product) (belongs to product) * product_id I'd like to retrieve those services whose products have overruns defined for them, and can do so b