search for: created_for

Displaying 1 result from an estimated 1 matches for "created_for".

2006 Apr 11
5
Multiple "has" in ActiveRecord
...39;'s say I have a table called People: create table people ( id serial8 primary key ,name); which just holds a list of the people in the database. Then I have another table like this: create table log ( id serial8 primary key ,created_by int8 references people(id) ,created_for int8 references people(id) ); Now, in my Model class, how do I handle this? class Log < ActiveRecord::Base has_one :People end Is there some way to differentiate the two different has_one references but keep them looking at the same table? Thanks much Jeff -- Posted via http://www.rub...