hi,
i am new to ror.
i have some doubt in associations.This is my db follow.


catalogues table
id
name

catalogue_items

id
catalogue_id
product_id
position


products
name
price

I have written the associations as follows for the above tables as

catalogue model

has_many:catalogue_item

products model

has_many:catalogue_item

catalogue_item model

belongs_to:catalogue
belongs_to:model

*******************************************
can i write the above as

* Catalogue has_many :catalogue_items
* Catalogue has_many products, :through => :catalogue_items

plz tell me whether both are correct or not
http://www.w3answers.com