[Rails] Re: Newbie Question

Joe Cairns
Mon, 27 Feb 2006 19:04:01 -0000

Nithin Reddy wrote:
> Well using your model, you can hide a lot of "ugly DB design" if
it is
> just naming conventions. You can use something like...
>
> def customer_id
>    attribute_read("cust_obj_id")
> end
>
> then just call customer_id from then on in your controllers and views.
> BTW the table customers should have a primary key simply called
"id"
> for true Rails semantics.

Thanks!  Would this also handle a table with a composite key?  Say
consisting of:
id1 number (5, 0)
id2 char (4)
id3 timestamp

If not is there a workaround?

--
Posted via http://www.ruby-forum.com/.