has_many :foos
belongs_to :foo
should work with a foo_id column in the table.
Michael
On Apr 2, 6:33 pm, Duane
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> I feel like I should kow this, but it''s ust not coming to me. I
have a
> model that points to a bunch of "related" instances of itself.
That is,
> Foo has_many :foos.
>
> How am I supposed to model that relationship? If I do a "has and
> belongs to many" then I''m going to end up with a
majors_majors table?
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---