Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Dec 14, 2011
  1. @jonleighton

    Fix #3672 again (dependent: delete_all perf)

    jonleighton authored
    Conflicts:
    
    	activerecord/lib/active_record/associations/builder/has_many.rb
    	activerecord/lib/active_record/associations/has_many_association.rb
Commits on Nov 19, 2011
  1. @jonleighton

    Perf fix

    jonleighton authored
    If we're deleting all records in an association, don't add a IN(..)
    clause to the query.
    
    Fixes #3672.
Commits on May 31, 2011
  1. @jonleighton
Commits on Mar 10, 2011
  1. @jonleighton

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

    jonleighton authored
    …neric AssociationScope class which is capable of building a scope for any association.
Commits on Feb 21, 2011
  1. @jonleighton @tenderlove

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

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

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

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

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

    jonleighton authored tenderlove committed
    …rectly accessing the instance variables
Commits on Feb 18, 2011
  1. @jonleighton

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

    jonleighton authored
    …ch manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
Commits on Feb 14, 2011
  1. @jonleighton
Commits on Feb 7, 2011
  1. @jonleighton

    Refactor the implementations of AssociatioCollection#delete and #dest…

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

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

    jonleighton authored
     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.
  3. @jonleighton

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

    jonleighton authored
    …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.
Commits on Jan 30, 2011
  1. @jonleighton
  2. @jonleighton
Commits on Jan 7, 2011
  1. @jonleighton @tenderlove

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

    jonleighton authored tenderlove committed
    … 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.
Commits on Jan 4, 2011
  1. @jonleighton @tenderlove
  2. @jonleighton @tenderlove

    Use the association directly in other places too

    jonleighton authored tenderlove committed
  3. @jonleighton @tenderlove

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

    jonleighton authored tenderlove committed
    …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.
Commits on Dec 31, 2010
  1. @jonleighton

    Rename AssociationReflection#primary_key_name to foreign_key, since t…

    jonleighton authored
    …he options key which it relates to is :foreign_key
  2. @jonleighton
Commits on Dec 26, 2010
  1. @jonleighton @tenderlove

    Refactor we_can_set_the_inverse_on_this? to use a less bizarre name a…

    jonleighton authored tenderlove committed
    …mongst other things
  2. @jonleighton

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

    jonleighton authored
    …e it all use arel rather than SQL strings
  3. @jonleighton
Commits on Dec 20, 2010
  1. @jonleighton @tenderlove
  2. @jonleighton @tenderlove

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

    jonleighton authored tenderlove committed
    …e counter cache when deleting records
  3. @jonleighton @tenderlove

    Refactor delete_records in HasManyAssociation

    jonleighton authored tenderlove committed
  4. @jonleighton @tenderlove

    Specify insert_record with NotImplementedError in AssociationCollecti…

    jonleighton authored tenderlove committed
    …on, to indicate that subclasses should implement it. Also add save_record to reduce duplication.
Commits on Dec 2, 2010
  1. @tenderlove
Commits on Nov 24, 2010
  1. @tenderlove

    reduce method calls

    tenderlove authored
  2. @tenderlove

    removing ternary

    tenderlove authored
Commits on Nov 23, 2010
  1. @miloops @tenderlove

    Refactor && simplify count_records.

    miloops authored tenderlove committed
  2. @miloops @tenderlove

    Remove explicit return and avoid creating local var.

    miloops authored tenderlove committed
  3. @miloops @tenderlove

    Remove explicit return.

    miloops authored tenderlove committed
Commits on Oct 30, 2010
  1. @jonleighton @tenderlove

    Refactoring: replace the mix of variables like @finder_sql, @counter_…

    jonleighton authored tenderlove committed
    …sql, etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly.
Commits on Aug 14, 2010
  1. @spastorino

    Deletes trailing whitespaces (over text files only find * -type f -ex…

    spastorino authored
    …ec sed 's/[ \t]*$//' -i {} \;)
Something went wrong with that request. Please try again.