search for: home_id

Displaying 2 results from an estimated 2 matches for "home_id".

Did you mean: home_idx
2006 May 24
1
AR many-many join tables - can they have created_on, updated_on ?
Hello all, I''m creating a many-many join table between ''homes'' and ''users''. Can it contain created_on? will AR update created_on, updated_on on this table? CREATE homes_users ( home_id int not null, user_id int not null, created_on datetime null, updated_on datetime null ) Thanks for your advice! -- ------------------------------ Apple MacBook. Black. It''s the new White! ------------------------------ Peter Fitzgibbons -------------- next part -------------- An HTML...
2006 Feb 18
1
Questions about ActiveRecord
...llo, I have a few questions about data base design and integrating the design into Rails. I''m creating a CMS for a local sports club and want to store the clubs, their teams and the matches in a data base. Here is the schema I made up: http://pastebin.com/561474 As you can see, I added home_id and guest_id to each match that link to the competing teams. My problem is telling Rails about this kind of relation. I want to be able to do something like this: # This should return all matches where team.id is home_id or guest_id: <% for match in @team.matches %> <%= match.home_point...