search for: magazine_ids

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

Did you mean: magazine_id
2006 Apr 11
3
Validations and has_many :through (Join Models)
Hello again: I''m hoping that somebody, anybody, can help with this question. How do I make sure that records in a join model are unique? Using the scenario outlined in Chad Fowler''s "Rails Recipies", number 16, "Many to Many Relationships Where the Relationship Iteself Has Data". Here are the tables: create_table :magazines do |t| t.column :title,
2006 Jul 27
0
CRUD, REST and associations
...the editing form (_form.rhtml when spit out by the scaffold generator), I display a table of checkboxes and magazines where subscriptions are shown and can''t be changed. <!-- hidden field, to get a request param, even if no checkbox is selected --> <%= hidden_field_tag reader[magazine_ids][]'', '''' %> <table> <tr> <td></td> </tr> <% for magazine in reader.magazines %> <tr> <td><%= check_box_tag ''reader[magazine_ids][]'', magazine.id, @reader.subscribed_to?(mag...
2006 Jan 21
7
n-way joins
Hi, I''m somewhat of a Rails newbie and am trying to understand how to formulate n-way (3 or 4 way) joins in Rails (where the join tables contain extra data as well.) Let me give you my basic entities: foos id - pk name - unique bars id - pk name - unique bazs id - pk name - unique frozs id - pk name - unique then i have two separate join tables: foos_bars_bazs - 3 way join