This project is archived and is in readonly mode.

#2822 ✓wontfix
Alex

Relationships Defined on One Side

Reported by Alex | June 20th, 2009 @ 05:12 PM | in 2.x

I'm not sure where to put feature requests, but I think it would be neat if relationships between models could be defined in only one of the models.

Strange as it may seem, it would be nice to decrease the coupling between models, so that say for example, User models could exist, without requiring Profile models. But that if added, Profiles can "enhance" Users.

The difficulty obviously being that all models would have to be inspected, even if you're only using one.

Either way, it was a thought I had.

Comments and changes to this ticket

  • Steve St. Martin

    Steve St. Martin April 16th, 2010 @ 01:40 AM

    • Assigned user set to “Ryan Bigg”

    This would probably be a great deal of work, and likely drastically increase startup time as all models would have to be reflected over to determine associations. I agree it would be nice, however by opening a model you would not be aware of the associations it contained as they might be on the opposite side. My vote is for readability.

    can probably be marked as wontfix until a patch is provided.

  • Ryan Bigg

    Ryan Bigg April 16th, 2010 @ 03:01 AM

    • State changed from “new” to “wontfix”

    I agree with Steve.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages