search for: order_status_code

Displaying 1 result from an estimated 1 matches for "order_status_code".

2006 May 10
12
how best to implement lookup table?
...ld I just implement a has_many relationship? Let''s say these are Order status codes, would the StatusCode have many Orders? This seems right from a database POV (normalizing the code and description into a separate table), but sort of goofy from a coding POV. "Order belongs_to :order_status_code" seems a little off to me. It would be nice if I could somehow automatically have the status description automatically be added as a read-only attribute to the Order class. Suppose the above approach is the correct one. Would I still use the standard id column as my primary key, or just...