Skip to content
This repository

Sep 25, 2013

  1. Rafael Mendonça França

    Merge pull request #12359 from arthurnn/inverse_on_callbacks

    Make sure inverse_of is visible on the has_many callbacks
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/test/models/company.rb
    authored

May 24, 2013

  1. Arun Agrawal

    It's scoped in 3-2-stable!

    scope => scoped
    authored

May 23, 2013

  1. Rafael Mendonça França

    Merge pull request #10713 from senny/10693_fix_primary_key_option_on_…

    …has_many
    
    Fix the `:primary_key` option for `has_many` associations.
    Conflicts:
    	activerecord/CHANGELOG.md
    	activerecord/lib/active_record/associations/has_many_association.rb

Jun 07, 2012

  1. Jon Leighton

    Revert "Perf: Don't load the association for #delete_all."

    This reverts commit b98d1e2.
    
    Closes #6609
    
    Conflicts:
    
    	activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
    authored

May 18, 2012

  1. Jon Leighton

    Perf: Don't load the association for #delete_all.

    Bug #6289
    
    Conflicts:
    
    	activerecord/test/cases/associations/has_many_associations_test.rb

Dec 14, 2011

  1. Jon Leighton

    Fix #3672 again (dependent: delete_all perf)

    authored

Nov 25, 2011

  1. Brian Samson

    load has_many associations keyed off a custom primary key if that key…

    … is present but the record is unsaved
    authored

Nov 19, 2011

  1. Jon Leighton

    Perf fix

    If we're deleting all records in an association, don't add a IN(..)
    clause to the query.
    
    Fixes #3672.
    authored

May 31, 2011

  1. Jon Leighton

    Only save the record once when calling create! on a collection associ…

    …ation. Fixes #1360.

May 23, 2011

  1. Sebastian Martinez

    Remove extra white spaces on ActiveRecord docs.

Mar 10, 2011

  1. Jon Leighton

    Move the code which builds a scope for through associations into a ge…

    …neric AssociationScope class which is capable of building a scope for any association.
    authored

Feb 21, 2011

  1. Jon Leighton

    Use proper objects to do the work to build the associations (adding m…

    …ethods, callbacks etc) rather than calling a whole bunch of methods with rather long names.
    authored tenderlove committed
  2. Jon Leighton

    Delegate Association#options to the reflection, and replace 'reflecti…

    …on.options' with 'options'. Also add through_options and source_options methods for through associations.
    authored tenderlove committed
  3. Jon Leighton

    Associations - where possible, call attributes methods rather than di…

    …rectly accessing the instance variables
    authored tenderlove committed

Feb 18, 2011

  1. Jon Leighton

    Split AssociationProxy into an Association class (and subclasses) whi…

    …ch manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
    authored

Feb 14, 2011

  1. Jon Leighton

    Get rid of AssociationCollection#save_record

    authored

Feb 07, 2011

  1. Jon Leighton

    Refactor the implementations of AssociatioCollection#delete and #dest…

    …roy to be more consistent with each other, and to stop passing blocks around, thus making the execution easier to follow.
    authored
  2. Jon Leighton

    Correctly update counter caches on deletion for has_many :through [#2824

    state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business.
    authored
  3. Jon Leighton

    Make record.association.destroy(*records) on habtm and hm:t only dele…

    …te records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry.
    authored

Jan 30, 2011

  1. Jon Leighton

    Rename AssociationProxy#loaded to loaded! as it mutates the association

    authored
  2. Jon Leighton

    Let's be less blasé about method visibility on association proxies

    authored

Jan 07, 2011

  1. Jon Leighton

    Construct an actual ActiveRecord::Relation object for the association…

    … scope, rather than a hash which is passed to apply_finder_options. This allows more flexibility in how the scope is created, for example because scope.where(a, b) and scope.where(a).where(b) mean different things.
    authored tenderlove committed

Jan 04, 2011

  1. Jon Leighton

    Create the association scope directly rather than going through with_…

    …scope
    authored tenderlove committed
  2. Jon Leighton

    Use the association directly in other places too

    authored tenderlove committed
  3. Jon Leighton

    Let AssociationCollection#find use #scoped to do its finding. Note th…

    …at I am removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences.
    authored tenderlove committed

Dec 31, 2010

  1. Jon Leighton

    Rename AssociationReflection#primary_key_name to foreign_key, since t…

    …he options key which it relates to is :foreign_key
    authored
  2. Jon Leighton

    And owner_quoted_id can go too

    authored

Dec 26, 2010

  1. Jon Leighton

    Refactor we_can_set_the_inverse_on_this? to use a less bizarre name a…

    …mongst other things
    authored tenderlove committed
  2. Jon Leighton

    Associations: DRY up the code which is generating conditions, and mak…

    …e it all use arel rather than SQL strings
    authored
  3. Jon Leighton

    Remove target_obsolete? which is not called from anywhere

    authored

Dec 20, 2010

  1. Jon Leighton

    Avoid Symbol#to_proc for performance reasons in Ruby 1.8

    authored tenderlove committed
  2. Jon Leighton

    has_many associations with :dependent => :delete_all should update th…

    …e counter cache when deleting records
    authored tenderlove committed
  3. Jon Leighton

    Refactor delete_records in HasManyAssociation

    authored tenderlove committed
  4. Jon Leighton

    Specify insert_record with NotImplementedError in AssociationCollecti…

    …on, to indicate that subclasses should implement it. Also add save_record to reduce duplication.
    authored tenderlove committed

Dec 02, 2010

  1. Aaron Patterson

    removing more calls to deprecated methods

    authored
Something went wrong with that request. Please try again.