[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ActiveRecord.Base#save broken after 1.0 upgrade

stevenbristol@gmail.com

12/22/2005 12:15:00 AM

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

3 Answers

Eero Saynatkari

12/22/2005 12:32:00 AM

0

stevenbristol@gmail.com 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/list...

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

--
Posted via http://www.ruby-....


Alpha Chen

12/22/2005 12:51:00 AM

0

I think these two revisions have fixed the problem:

http://dev.rubyonrails.org/chan...
http://dev.rubyonrails.org/chan...

Alpha Chen

On Dec 21, 2005, at 7:17 PM, stevenbristol@gmail.com 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?
>
> Thanks,
> Steven A Bristol
>
>



stevenbristol@gmail.com

12/22/2005 1:10:00 AM

0

THANK YOU!!!

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

steve