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.
    
    Conflicts:
    
    	activerecord/lib/active_record/relation/finder_methods.rb
    	activerecord/test/cases/adapter_test.rb
    authored

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

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 tenderlove committed
  2. 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
  2. Jon Leighton

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

    …roc { ... } rather than instance_eval-ing strings
    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

    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

    @join_table_name is no longer used

    authored
  2. Jon Leighton

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

    authored

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 tenderlove committed

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 05, 2011

  1. Aaron Patterson

    avoid creating so many Arel::Table objects

    authored
  2. Aaron Patterson

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

    authored
  3. Aaron Patterson

    use arel ast construction rather than generating strings

    authored
  4. Aaron Patterson

    use arel to construct AST rather than generate strings

    authored

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

    Create the association scope directly rather than going through with_…

    …scope
    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

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

Dec 20, 2010

  1. Jon Leighton

    Remove unnecessary overloaded methods create, create! and create_reco…

    …rd from HasAndBelongsToManyAssociation
    authored tenderlove committed
  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 tenderlove committed

Dec 02, 2010

  1. Aaron Patterson

    remove calls to deprecated methods

    authored
  2. Aaron Patterson

    removing some calls to insert on arel

    authored

Nov 28, 2010

  1. José Valim

    Partialy revert f1c13b0

    authored

Nov 25, 2010

  1. Emilio Tagua

    Remove explicit return.

    Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
    authored spastorino committed

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
      ActiveRecord
    
    [#5927 state:committed]
    
    Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
    authored spastorino committed

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 tenderlove committed

Sep 22, 2010

  1. Emilio Tagua

    Perf: refactor method.

    Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
    authored spastorino committed
  2. Aaron Patterson

    do not pass nil values to arel

    authored

Aug 25, 2010

  1. Aaron Patterson

    mark SQL literals as SQL literals

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