Displaying 2 results from an estimated 2 matches for "interest_id".
2005 Mar 04
3
optimization
...id = 1 LIMIT 1
[4;35mAccount Count (0.110000) [0;37mSELECT COUNT(*) FROM
accounts WHERE person_id = 1
[4;33mAccount Load (0.140000) [1;37mSELECT * FROM accounts
WHERE person_id = 1
[4;35mInterest Load (0.125000) [0;37mSELECT t.*, j.* FROM
interests_people j, interests t WHERE t.id = j.interest_id AND
j.person_id = 1 ORDER BY t.id
[4;33mService Load (0.110000) [1;37mSELECT * FROM services
WHERE id = 5 LIMIT 1
[4;35mService Columns (0.110000) [0;37mSHOW FIELDS FROM services
[4;33mAccount Count (0.109000) [1;37mSELECT COUNT(*) FROM
accounts WHERE service_id = 5
[4;35mAccount Loa...
2006 May 10
1
Validates_uniqueness_of multiple field combo?
Hello,
I am new to Ruby on rails and this is therefore probably trivial. Lets
say I have 3 tables - users[id,name, age, ...],
interests[id,name,description, ...], and finally a table
user_interests[id,user_id,interest_id] to link a user to a set of
interests. Now there is no problem to put validates_uniqueness_of :name
in the user-model to ensure that I only have one Lenny, but how do I
validate the uniqueness of Lenny''s interests in the user_interest-table?
Ie, is there a method to validate that an en...