From: Tom Wilcoxen Date: 2005-09-10T06:17:12+09:00 Subject: Re: Rails and Code Tables If I follow, then you're db would look something like: create table code( code varchar(15) not null, value varchar(40) not null, type varchar(15) not null ) If you did that you could use single table inheritance I think. You'd have a main Code ActiveRecord object, then a specific one for each type, e.g. Address < Code. Then you could use those AR objects to get the types you need. If you use the above you'll need to declare code to be your primary key in your AR object and you'd want it to be unique across your types. -Tom -- Tom Wilcoxen http://convergentarts.com http://www.dreamhost.com/r.cgi?twilcoxen