Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 19, 2011
  1. Jon Leighton

    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. Jon Leighton
Commits on May 23, 2011
  1. Sebastian Martinez
Commits on Mar 10, 2011
  1. Jon Leighton

    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. Jon Leighton Aaron Patterson

    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. Jon Leighton Aaron Patterson

    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. Jon Leighton Aaron Patterson

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

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

    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. Jon Leighton
Commits on Feb 7, 2011
  1. Jon Leighton

    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. Jon Leighton

    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. Jon Leighton

    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. Jon Leighton
  2. Jon Leighton
Commits on Jan 7, 2011
  1. Jon Leighton Aaron Patterson

    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. Jon Leighton Aaron Patterson
  2. Jon Leighton Aaron Patterson

    Use the association directly in other places too

    jonleighton authored tenderlove committed
  3. Jon Leighton Aaron Patterson

    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. Jon Leighton

    Rename AssociationReflection#primary_key_name to foreign_key, since t…

    jonleighton authored
    …he options key which it relates to is :foreign_key
  2. Jon Leighton
Commits on Dec 26, 2010
  1. Jon Leighton Aaron Patterson

    Refactor we_can_set_the_inverse_on_this? to use a less bizarre name a…

    jonleighton authored tenderlove committed
    …mongst other things
  2. Jon Leighton

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

    jonleighton authored
    …e it all use arel rather than SQL strings
  3. Jon Leighton
Commits on Dec 20, 2010
  1. Jon Leighton Aaron Patterson
  2. Jon Leighton Aaron Patterson

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

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

    Refactor delete_records in HasManyAssociation

    jonleighton authored tenderlove committed
  4. Jon Leighton Aaron Patterson

    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. Aaron Patterson
Commits on Nov 24, 2010
  1. Aaron Patterson

    reduce method calls

    tenderlove authored
  2. Aaron Patterson

    removing ternary

    tenderlove authored
Commits on Nov 23, 2010
  1. Emilio Tagua Aaron Patterson

    Refactor && simplify count_records.

    miloops authored tenderlove committed
  2. Emilio Tagua Aaron Patterson

    Remove explicit return and avoid creating local var.

    miloops authored tenderlove committed
  3. Emilio Tagua Aaron Patterson

    Remove explicit return.

    miloops authored tenderlove committed
Commits on Oct 30, 2010
  1. Jon Leighton Aaron Patterson

    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. Santiago Pastorino

    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.