On 12 May 2010 16:15, Gone Sail <[email protected]> wrote:
> Sharagoz wrote:
>> It would be easier if you actually describe the problem you are trying
>> to solve.
>> Lets use Person has_many Things as an example.
>> It sounds to me like you need to either put these new attributes in
>> the things table, or create a new assocication from the new table to
>> things.
>
> i pretty much already described it. if you had a HABTM association
> between people and books .. i wanted to have attributes attached to each
> association. for example: for person 5 and book 4 you would have related
> records 1 and 2.

It was not entirely clear, nor is it now, though I think I get an idea
what you mean. In the first post you said it was one to many, now it
is many to many.  Assuming many to many

Person
has_many book_associations
has_many books through book_associations

Book
has_many book_associations
has_many people through book_associations

BookAssociation
belongs_to person
belongs_to book
has_many somethings   (I don't know what you want to call this)

Something
belongs_to BookAssociation

Does that help?

Colin

-- 
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