Skip to content
This repository

Aug 08, 2011

  1. Jon Leighton

    Make it the responsibility of the connection to hold onto an ARel vis…

    …itor for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
    authored August 08, 2011

May 31, 2011

  1. Jon Leighton

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

    …ation. Fixes #1360.

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 March 10, 2011

Feb 21, 2011

  1. 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 February 20, 2011 tenderlove committed February 21, 2011
  2. Jon Leighton

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

    …rectly accessing the instance variables
    authored February 20, 2011 tenderlove committed February 21, 2011

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 February 17, 2011

Feb 14, 2011

  1. Jon Leighton

    Get rid of AssociationCollection#save_record

    authored February 14, 2011
  2. Jon Leighton

    Add interpolation of association conditions back in, in the form of p…

    …roc { ... } rather than instance_eval-ing strings
    authored February 11, 2011

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 February 06, 2011
  2. 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 January 30, 2011

Jan 30, 2011

  1. Jon Leighton

    @join_table_name is no longer used

    authored January 26, 2011
  2. Jon Leighton

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

    authored January 24, 2011

Jan 16, 2011

  1. Jon Leighton

    Removed support for accessing attributes on a has_and_belongs_to_many…

    … join table. This has been documented as deprecated behaviour since April 2006. Please use has_many :through instead. A deprecation warning will be added to the 3-0-stable branch for the 3.0.4 release.
    authored January 16, 2011 tenderlove committed January 16, 2011

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 January 06, 2011 tenderlove committed January 07, 2011

Jan 05, 2011

  1. Aaron Patterson

    avoid creating so many Arel::Table objects

    authored January 05, 2011
  2. Aaron Patterson

    we have a method for this, so let's use it

    authored January 05, 2011
  3. Aaron Patterson

    use arel ast construction rather than generating strings

    authored January 05, 2011
  4. Aaron Patterson

    use arel to construct AST rather than generate strings

    authored January 05, 2011

Jan 04, 2011

  1. Raimonds Simanovskis

    Explicitly select * from has_and_belongs_to_many association tables, …

    …simplify exists? query
    Previous version (after commit 3103296) was generating wrong SQL for Oracle when calling exists? method on HABTM association.
    authored January 04, 2011
  2. Jon Leighton

    Create the association scope directly rather than going through with_…

    authored January 03, 2011 tenderlove committed January 03, 2011
  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 January 02, 2011 tenderlove committed January 03, 2011

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 December 31, 2010

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 December 26, 2010 tenderlove committed December 26, 2010
  2. Jon Leighton

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

    …e it all use arel rather than SQL strings
    authored December 24, 2010

Dec 20, 2010

  1. Jon Leighton

    Remove unnecessary overloaded methods create, create! and create_reco…

    …rd from HasAndBelongsToManyAssociation
    authored December 17, 2010 tenderlove committed December 20, 2010
  2. 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 December 16, 2010 tenderlove committed December 20, 2010

Dec 02, 2010

  1. Aaron Patterson

    remove calls to deprecated methods

    authored December 02, 2010
  2. Aaron Patterson

    removing some calls to insert on arel

    authored December 02, 2010

Nov 28, 2010

  1. José Valim

    Partialy revert f1c13b0

    authored November 28, 2010

Nov 25, 2010

  1. Emilio Tagua

    Remove explicit return.

    Signed-off-by: Santiago Pastorino <>
    authored November 25, 2010 spastorino committed November 25, 2010

Nov 09, 2010

  1. David Chelimsky

    use persisted? instead of new_record? wherever possible

    - persisted? is the API defined in ActiveModel
    - makes it easier for extension libraries to conform to ActiveModel APIs
      without concern for whether the extended object is specifically
    [#5927 state:committed]
    Signed-off-by: Santiago Pastorino <>
    authored November 07, 2010 spastorino committed November 09, 2010

Oct 30, 2010

  1. Jon Leighton

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

    …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.
    authored October 21, 2010 tenderlove committed October 30, 2010

Sep 22, 2010

  1. Emilio Tagua

    Perf: refactor method.

    Signed-off-by: Santiago Pastorino <>
    authored September 22, 2010 spastorino committed September 22, 2010
  2. Aaron Patterson

    do not pass nil values to arel

    authored September 21, 2010

Aug 25, 2010

  1. Aaron Patterson

    mark SQL literals as SQL literals

    authored August 24, 2010
Something went wrong with that request. Please try again.