Displaying 1 result from an estimated 1 matches for "user_is".
Did you mean:
user_ds
2006 Jun 23
2
Foreign key - relations
...varchar(200),
user_id int,
sales_id int);
create table users (
id int auto..,
name varchar(50));
So project.user_id has a foreign key to user.id - all is good.
Everything works fine.
Now my question..
How can set a relationship from two different fields to the users table
??
Fx. I will user_is who might be the owner of the project, afterwards I
would like to assign a salesrep to the project.. so sales_id should also
be looked up in the users table..
How do I tell rails about this relation ?
TIA,
/mich
--
Posted via http://www.ruby-forum.com/.