Fix has_many assocation w/select load after create #7859

merged 1 commit into from Oct 10, 2012
Commits on Oct 5, 2012
  1. Fix has_many assocation w/select load after create

    ernie committed Oct 5, 2012
    If you create a new record via a collection association proxy that has
    not loaded its target, and which selects additional attributes through
    the association, then when the proxy loads its target, it will
    inadvertently trigger an ActiveModel::MissingAttributeError during
    attribute writing when CollectionAssociation#merge_target_lists attempts
    to do its thing, since the newly loaded records will possess attributes
    the created record does not.
    This error also raises a bogus/confusing deprecation warning when
    accessing the association in Rails 3.2.x, so cherry-pick would be