From: albartell

I am guessing RoR works off of foreign key constraints and the like to
determine the relationships one table has to another.  Does anybody have
such a db with a decent amount of complexity that they could post the
structure of to this list?

Actually, one of the complaints I've read about Rails is that it doesn't
understand foreign keys very well.  I tried to understand why not; as far as
I can tell DHH insists that since he can't tell whether a foreign key
relationship is 1-1, 1-N or N-N, then he isn't going to do any of them.
This seems to me an odd concept for a convention-based language, but he runs
the ship.

Also, if your tables aren't named the way Rails like them (the name of a
table is plural, such as customers) and your columns aren't named the way
Rails wants them (a link to the customers table must be called customer_id),
then you lose much of RoR's ability to do things for you.  That's the
downside of "coding by convention".

I am particularly not fond of the table naming silliness.  What if I have a
list of octopi.  Do I have to call the table octopuss?  <grin>

And please, remember, I am NOT downing RoR.  Both Ruby and Rails are
examples of excellent programming done by exceptionally talented people.
I'm just trying to keep the hype to a minimum so that we find out just how
good these tools are WITHOUT having to fend off the fanatics.  I'll be happy
to face the wrath of the Inquisition if in the end it provides the impetus
for an honest appraisal of the tools.


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].