search for: jointabl

Displaying 3 results from an estimated 3 matches for "jointabl".

Did you mean: jointable
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have article_groups as a jointable. Now I want to select every article who is a member of group with id ''1'' and id ''2''. Whats best way to get that? Extract from schemas: CREATE TABLE articles ( id int auto_increment, ingress text NOT NULL, story_text longtext, constraint fk_items_users foreign...
2006 Aug 22
0
Re: Problem with find condition and habtm relationship.
...oubling me for some time now. Please bare with me > while I explain the situation to make things clear. > > I''m making a restaurant directory in RoR. I have a table of > Restaurants > and a table of Features which both have a habtm relationship with each > other using a jointable called features_restaurants which has the > fields feature_id and restaurant_id. > > So restaurants can belong to many different features such as > "vegitarian menu", "child friendly" etc. In the view checkboxes are > dynamically created for each feature using th...
2006 Aug 03
12
More than one has_many :through association between the same 2 models
I wonder if you can have more than one has_many :through association between 2 models. For example... I have a model Teacher and a model Class Now, 1 Teacher works in many Classes, right?. So I need a join model like class Work < ActiveRecord::Base belongs_to :teacher belongs_to :class end But I also would like to know if a teacher CAN teach a class before I