Re: Ruby on Rails Review
Arturo Perez <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Andrus Adamchik wrote: > Hi Pierce, > >> There is one thing that AR does better then EOF: You can easily map a >> class to a column or set of columns. So if you have a value that can >> only be 1-5, you can write a class that both is stored as 1-3, and >> returns the name: High,Medium,Low. > There is actually a fairly simple way to do that. Look for "How To Use A Type Safe Enum As A Custom Value In EOF" on the Apple mailing lists. I admit the first time you do it it seems a bit strange but after that it's fairly obvious how to get as many as you like :-) -arturo