Hi thanks works like a charm!
but i'm just curious performance wise when I look at mongrel it seems that there are two queries first the children.all() then for each record it does a new query for mother get name... now is that as quick compare to juts one query with a left join and get all the data in children(). Colin Law wrote: > If you have set up the associations (belongs_to and has_many) then if > you > have a Child object child you can just say child.mother to get the > mother. > Similarly if you have a mother object you can say mother.children to get > the > children. It is all done by magic. > Colin > > 2009/5/12 Anthony Ward <rails-mailing-l...@andreas-s.net> -- 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---