# Re: Re: multiple habtm problem

**URL:** <https://www.ruby-forum.com/t/re-re-multiple-habtm-problem/97072>\
**Category:** Rails\
**Created:** [December 10, 2005, 2:06am UTC](https://www.ruby-forum.com/t/re-re-multiple-habtm-problem/97072 "2005-12-10T02:06:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arudgick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@arudgick](https://www.ruby-forum.com/u/arudgick)\
**Post date:** [December 10, 2005, 2:06am UTC](https://www.ruby-forum.com/t/re-re-multiple-habtm-problem/97072/1 "2005-12-10T02:06:36Z")

</div>

i’ve established that only the habtm relationhip listed first in my  
shirt  
model will submit to the join on the ‘new’ action

yet both still work on the ‘update’ action

-a

---

<div class="post-metadata">

**Author:** ![arudgick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@arudgick](https://www.ruby-forum.com/u/arudgick)\
**Post date:** [December 15, 2005, 9:47pm UTC](https://www.ruby-forum.com/t/re-re-multiple-habtm-problem/97072/2 "2005-12-15T21:47:35Z")

</div>

I’ve found this too Anthony. Have you opened up a bug report on this?

-Nick

---

<div class="post-metadata">

**Author:** ![arudgick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@arudgick](https://www.ruby-forum.com/u/arudgick)\
**Post date:** [December 15, 2005, 9:59pm UTC](https://www.ruby-forum.com/t/re-re-multiple-habtm-problem/97072/3 "2005-12-15T21:59:44Z")

</div>

Hey Nick, Anthony, ara,

Search the archives of this mailing list for: \*[Rails] Problem with  
.save  
when model has two HABTM  
\*  
Several people have contibuted to this ‘feature’.

The short of it, on create you have to save the collection owner and  
then  
alter the collections.

Not ideal, but works.

It still might be a good idea to submit an issue for this; the  
documentation  
suggests even the first collection shouldn’t be saved for newly created  
models, though.

-Mel

---

<div class="post-metadata">

**Author:** ![arudgick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@arudgick](https://www.ruby-forum.com/u/arudgick)\
**Post date:** [December 15, 2005, 10:14pm UTC](https://www.ruby-forum.com/t/re-re-multiple-habtm-problem/97072/4 "2005-12-15T22:14:50Z")

</div>

I submitted a ticket a couple of days ago.

[http://dev.rubyonrails.org/ticket/3213](http://dev.rubyonrails.org/ticket/3213)

Apparently it has been fixed. I haven’t checked out the latest trunk  
yet to test it.

---

<div class="post-metadata">

**Author:** ![arudgick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@arudgick](https://www.ruby-forum.com/u/arudgick)\
**Post date:** [December 16, 2005, 1:38am UTC](https://www.ruby-forum.com/t/re-re-multiple-habtm-problem/97072/5 "2005-12-16T01:38:23Z")

</div>

Ya, found this ticket and tried out the patch. Seems to work alright for  
me.
