The join table should be called categories_stores

Having setup the relationships and the tables, then, for example, if you
have a store object from the database then you can use store.categories to
get a collection of categories for that store.

2009/3/12 Inderpal Bhogal <[email protected]>

>
> hi Brian,
>
> thanx for repylin back, its v.much appriciated.
>
> yes your absolutely right. i have used a has_and_belongs_to_many with a
> join table being created called categoriesstores. this join
> "categoriesstores" has the attributes category_id and store_id.
>
> --
> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to