Has_and_belongs_to_many - Access to Linkingtable

Hello,

i just don’t get how to refer and edit the automaticly generated table
by has_many_belongs_to_many (n:m) relation.

Here are my basics (shortend):

class Country < ActiveRecord::Base

has_and_belongs_to_many :regions

end

class Region < ActiveRecord::Base

has_and_belongs_to_many :countries

end

So now rails creates a new table countries_regions in the db. how can i
access the information out of this table. E.g. i want to know the region
of a specific country (by id). Lets say the country belongs to 2 regions
(Europe, Asia).

thanks rob

find country with id 12:

@country = Country.find(12)

then access it’s regions with:
@country.regions