search for: referenceitem

Displaying 2 results from an estimated 2 matches for "referenceitem".

2006 Apr 09
4
Inheritance via Though Associations?
I posted something about this a week ago wihtout response, but have made some progress since. However, I''m still not getting exactly what I want. OK, three core tables: create_table :reference_items do |t| t.column :title, :string, :limit => 255 t.column :year, :integer, :limit => 4 t.column :type, :string t.column
2006 Apr 02
0
STI and through
...ey, "type" varchar(20), "title" varchar(255), "year" year(4) ); CREATE TABLE "agents" ( "id" integer primary key, "type" varchar(20), "sort_name" varchar(255), "description" text ); So I''ve got ReferenceItem and Agent classes, each of which has subclasses (for the first, stuff like Book, Article, etc.). The third key table links the above: CREATE TABLE contributors ( "reference_item_id" integer, "agent_id" integer, "position" integer, "type" varchar(20)...