Skip to content
Commits on Mar 10, 2011
  1. @jonleighton

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

    jonleighton committed
    …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 committed with tenderlove
    …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 committed with tenderlove
    …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 committed with tenderlove
    …rectly accessing the instance variables
Commits on Feb 18, 2011
  1. @jonleighton

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

    jonleighton committed
    …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 committed
    …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 committed
     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 committed
    …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 committed with tenderlove
    … 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
  3. @jonleighton @tenderlove

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

    jonleighton committed with tenderlove
    …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 committed
    …he options key which it relates to is :foreign_key
  2. @jonleighton
Commits on Dec 26, 2010
  1. @jonleighton @tenderlove
  2. @jonleighton

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

    jonleighton committed
    …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 committed with tenderlove
    …e counter cache when deleting records
  3. @jonleighton @tenderlove
  4. @jonleighton @tenderlove

    Specify insert_record with NotImplementedError in AssociationCollecti…

    jonleighton committed with tenderlove
    …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 committed
  2. @tenderlove

    removing ternary

    tenderlove committed
Commits on Nov 23, 2010
  1. @miloops @tenderlove
  2. @miloops @tenderlove
  3. @miloops @tenderlove

    Remove explicit return.

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

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

    jonleighton committed with tenderlove
    …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 committed
    …ec sed 's/[ \t]*$//' -i {} \;)
Commits on Aug 13, 2010
  1. @tenderlove
  2. @tenderlove

    avoiding symbol to proc again

    tenderlove committed
Commits on Aug 4, 2010
  1. @fxn
Something went wrong with that request. Please try again.