Hi, Let''s say I have 4 models: City, Line, Direction, Message City ha many lines lines has many directions and direction has many message Tell me if what''s next is correct Line as many messages through line City has many messages throufh line Is this possible especially for the city model? Is this the correct way to access messages from city? Greg -- Posted via http://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Tell me if what''s next is correct > Line as many messages through lineNo> City has many messages throufh lineNo City ha many lines Line has many directions Direction has many messages + City has many directions through lines City has many messages through directions This will allow you to do access a city''s messages directly with city.messages. For this you would need the "nested has many through" gem, as rails cannot use "has many through" more than one level deep. http://github.com/ianwhite/nested_has_many_through -- Posted via http://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.