Hi Assume tables are names, addresses So the junction table should be addresses_names by default This can be override if needed.. And the join table wont have id column This is has_and_belongs_to_many(HABTM) Have you setup relationships properly If so you can get all the addresses corresponding to a name by
example name = Name.first name.addresses and viceversa address = Address.find 1 address.names And better rename your tables to something like contacts and contact_addresses Sijo -- 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 -~----------~----~----~----~------~----~------~--~---