# ActiveRecord.Base#save broken after 1.0 upgrade

**URL:** <https://www.ruby-forum.com/t/activerecord-base-save-broken-after-1-0-upgrade/74268>\
**Category:** Ruby\
**Created:** [December 22, 2005, 1:18am UTC](https://www.ruby-forum.com/t/activerecord-base-save-broken-after-1-0-upgrade/74268 "2005-12-22T01:18:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 22, 2005, 1:18am UTC](https://www.ruby-forum.com/t/activerecord-base-save-broken-after-1-0-upgrade/74268/1 "2005-12-22T01:18:23Z")

</div>

I have several models which all have has\_and\_belongs\_to\_many  
releationships with each other. When the create action is called, the  
ActiveRecord.Base#save will only save one of these relationships, the  
rest will be ignored. When the update action is called the  
ActiveRecord.Base#save will then save all of the relationships. Both  
actions call the same method to get the values (from the multi-select  
box) and populate the accociated objects. Before upgrading to 1.0 this  
worked fine. After upgrading it broke. After rolling back it worked  
again. Also, it is happening for all the models.

My ISP says they have not heard of this from anyone else, and no one on  
irc has heard of it either?

Does anyone have any ideas?

Thanks,  
Steven A Bristol

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 22, 2005, 1:31am UTC](https://www.ruby-forum.com/t/activerecord-base-save-broken-after-1-0-upgrade/74268/2 "2005-12-22T01:31:59Z")

</div>

removed\_email\_address@domain.invalid wrote:

> I have several models which all have has\_and\_belongs\_to\_many  
> releationships with each other. When the create action is called, the  
> ActiveRecord.Base#save will only save one of these relationships, the  
> rest will be ignored. When the update action is called the  
> ActiveRecord.Base#save will then save all of the relationships. Both  
> actions call the same method to get the values (from the multi-select  
> box) and populate the accociated objects. Before upgrading to 1.0 this  
> worked fine. After upgrading it broke. After rolling back it worked  
> again. Also, it is happening for all the models.
> 
> My ISP says they have not heard of this from anyone else, and no one on  
> irc has heard of it either?
> 
> Does anyone have any ideas?

You will probably have better luck on the Rails mailing list:

[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Also, if possible, include relevants parts of your code  
or post them online since this certainly seems to be a  
strange problem 🙂

> Thanks,  
> Steven A Bristol

E

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 22, 2005, 1:51am UTC](https://www.ruby-forum.com/t/activerecord-base-save-broken-after-1-0-upgrade/74268/3 "2005-12-22T01:51:29Z")

</div>

I think these two revisions have fixed the problem:

[http://dev.rubyonrails.org/changeset/3331](http://dev.rubyonrails.org/changeset/3331)  
[http://dev.rubyonrails.org/changeset/3332](http://dev.rubyonrails.org/changeset/3332)

Alpha Chen

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 22, 2005, 2:15am UTC](https://www.ruby-forum.com/t/activerecord-base-save-broken-after-1-0-upgrade/74268/4 "2005-12-22T02:15:35Z")

</div>

THANK YOU!!!

Thanks very much for this information. Are these released? How can I  
get the changes?

steve
