Displaying 1 result from an estimated 1 matches for "generic_object_id".
2007 Apr 14
0
has_one with reference to the one stored in this object's table?
...AR''s automatic single table inheritance to have it create the right
class.
Here''s what I have so far:
table generic_objects:
id int(11) not null auto_increment primary key
type varchar(255)
table generic_fields:
id int(11) not null auto_increment primary key
generic_object_id int(11) not null <-- points to its
owner
name varchar(255) not null
string_value varchar(255)
object_value_id int(11)
object_value_type varchar(255)
class GenericObject < ActiveRecord::Base
has_many :generic_fields, :dependent => :destroy
end
class Gene...