Skip to content
This repository

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

Feb 21, 2011

  1. Jon Leighton

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

    …ethods, callbacks etc) rather than calling a whole bunch of methods with rather long names.
    jonleighton authored tenderlove committed
  2. 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.
    jonleighton authored tenderlove committed
  3. Jon Leighton

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

    …rectly accessing the instance variables
    jonleighton 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.
    jonleighton authored

Feb 14, 2011

  1. Jon Leighton

    Get rid of AssociationCollection#save_record

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

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

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

Jan 30, 2011

  1. Jon Leighton

    Rename AssociationProxy#loaded to loaded! as it mutates the association

    jonleighton authored
  2. Jon Leighton

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

    jonleighton authored

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.
    jonleighton authored tenderlove committed

Jan 04, 2011

  1. Jon Leighton

    Create the association scope directly rather than going through with_…

    …scope
    jonleighton authored tenderlove committed
  2. Jon Leighton

    Use the association directly in other places too

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

    And owner_quoted_id can go too

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

    Remove target_obsolete? which is not called from anywhere

    jonleighton authored

Dec 20, 2010

  1. Jon Leighton

    Avoid Symbol#to_proc for performance reasons in Ruby 1.8

    jonleighton authored tenderlove committed
  2. Jon Leighton

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

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

    Refactor delete_records in HasManyAssociation

    jonleighton authored tenderlove committed
  4. Jon Leighton

    Specify insert_record with NotImplementedError in AssociationCollecti…

    …on, to indicate that subclasses should implement it. Also add save_record to reduce duplication.
    jonleighton authored tenderlove committed

Dec 02, 2010

  1. Aaron Patterson

    removing more calls to deprecated methods

    tenderlove authored

Nov 24, 2010

  1. Aaron Patterson

    reduce method calls

    tenderlove authored
  2. Aaron Patterson

    removing ternary

    tenderlove authored

Nov 23, 2010

  1. Emilio Tagua

    Refactor && simplify count_records.

    miloops authored tenderlove committed
  2. Emilio Tagua

    Remove explicit return and avoid creating local var.

    miloops authored tenderlove committed
  3. Emilio Tagua

    Remove explicit return.

    miloops authored tenderlove 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.
    jonleighton authored tenderlove committed

Aug 14, 2010

  1. Santiago Pastorino

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

    …ec sed 's/[ \t]*$//' -i {} \;)
    spastorino authored

Aug 13, 2010

  1. Aaron Patterson

    removing references to arel constants

    tenderlove authored
  2. Aaron Patterson

    avoiding symbol to proc again

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