This project is archived and is in readonly mode.

Changeset [0123ceb9cd1ae352308184852cae1edbd62155e1] by Aaron Patterson

February 14th, 2011 @ 07:51 PM

Merge remote branch 'jonleighton/association_fixes'

  • jonleighton/association_fixes: Add a transaction wrapper in add_to_target. This means that #build will now also use a transaction. IMO this is reasonable given that the before_add and after_add callbacks might do anything, and this great consistency allows us to abstract out the duplicate code from #build and #create. Inline ensure_owner_is_persisted! as it is only called from one place @target should always be an array Rename add_record_to_target_with_callbacks to add_to_target Don't pass the block through build_record Move create and create! next to build Get rid of create_record as it is not only used in one place Get rid of AssociationCollection#save_record Fix test/cases/connection_pool_test.rb for sqlite3 in-memory db Add interpolation of association conditions back in, in the form of proc { ... } rather than instance_eval-ing strings https://github.com/rails/rails/commit/0123ceb9cd1ae352308184852cae1...

Committed by Aaron Patterson

  • M activerecord/CHANGELOG
  • M activerecord/lib/active_record/association_preload.rb
  • M activerecord/lib/active_record/associations/association_collection.rb
  • M activerecord/lib/active_record/associations/association_proxy.rb
  • M activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
  • M activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  • M activerecord/lib/active_record/associations/has_many_association.rb
  • M activerecord/lib/active_record/associations/has_many_through_association.rb
  • M activerecord/lib/active_record/associations/through_association.rb
  • M activerecord/lib/active_record/autosave_association.rb
  • M activerecord/lib/active_record/base.rb
  • M activerecord/lib/active_record/nested_attributes.rb
  • M activerecord/test/cases/associations/eager_test.rb
  • M activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
  • M activerecord/test/cases/associations/has_many_associations_test.rb
  • M activerecord/test/cases/associations/has_many_through_associations_test.rb
  • M activerecord/test/cases/associations/has_one_associations_test.rb
  • M activerecord/test/cases/base_test.rb
  • M activerecord/test/cases/connection_pool_test.rb
  • M activerecord/test/models/company.rb
  • M activerecord/test/models/post.rb
  • M activerecord/test/models/project.rb
  • M activerecord/test/models/tagging.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>