New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
has_and_belongs_to_many autosave: true, dont save child records #13923
Comments
Could you create self executable gist? https://github.com/rails/rails/blob/master/guides/bug_report_templates/active_record_master.rb |
@rafaelfranca here https://gist.github.com/maurogeorge/8776223. Got the same issue |
I can confirm this is a regression from |
Great! Thanks guys. |
The error was in fact the refactoring to use I added another test-case with a raw association to prevent against further regressions. @maurogeorge thanks for reporting 💛 |
@senny you beat me by a couple of hours... this was supposed to be my first rails commit! Although your solution is more elegant than mine! :) |
@girishso sorry to hear, please respond on tickets you are planning to work on. Also share your investigation results so that the invested time can be used to move the issues forward. |
@senny thanks a lot 💚 |
Thank you @senny will keep that in mind! |
Guys,
I was working on shoulda-matchers to make his works with the rails 4.1.0.beta1. I guess the
has_and_belongs_to_many
withautosave: true
is broken.I show some code. First the models
In rails 3.2:
Works as expected on rails 3.2, when I save
Person
, its saves theRelative
, theadopted
change from nil to false.In Rails 4.1.0.beta1
On rails 4.1.0.beta1, when I save
Person
, its dont save theRelative
, theadopted
keeps nil.The text was updated successfully, but these errors were encountered: