Displaying 1 result from an estimated 1 matches for "attributestring".
2006 Jul 25
1
Node Attributes
...with type :date, "history" with type :text,
etc, while an individual would have "firstname" and "lastname" as
string, "birthdate" as :date, etc.
There are two ways to represent this... i can do a polymorphic
associations to each type, such that i have an AttributeString model,
AttributeDate model, etc. which belongs to the Node model
polymorphically. Or what i can do is put all the Attributes in one
model, with a column in the database for every kind of type:
create_table :attributes do |t|
t.column :name, :string
t.column :type, :string
t...