alias_attribute is another nice one if you're dealing with a nasty
schema. If you're so lucky as to be able to modify the schema as you
go then it will be cake. Even with a set schema or a shared DB it's
still easy.

Something I wish someone would have told me about dealing with legacy
databases: build a simple wrapper app around it that serves json in a
more organized way and then say goodbye to the legacy schema. Only you
can decide if that's right for you though.

Good luck,

Martin

/ on my iPhone

On Dec 8, 2009, at 9:42, David <[email protected]> wrote:

> Hi all! This is one of those "I'm asking for a friend" type things. No
> really, I'm asking for a friend!
>
> So he has this 'legacy' mySQL database and wants to build a new
> version of the site in Rails.
>
> His desire is to get Rails to build scaffolds for him based on his
> database's schema. Without having to sit there and type out every
> table and every column in the script/generate scaffold command.
>
> Naturally I laughed at him for a while. I've got no experience of
> dealing with legacy databases but told him that Rails wasn't really
> built for that.
>
> Any suggestions?
>
> Thanks
> David
>
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to