Skip to content
This repository

Oct 02, 2013

  1. Aaron Patterson

    remove HABTM associations

    tenderlove authored

Jul 02, 2013

  1. Neeraj Singh

    Removed support for deprecated `delete_sql` in associations.

  2. Neeraj Singh

    Removed support for deprecated `insert_sql` in associations.

Mar 09, 2013

  1. Ben Moss

    Deprecate #connection in favour of accessing it via the class

    This allows end-users to have a `connection` method on their models
    without clashing with ActiveRecord internals.
    benmoss authored

Aug 01, 2012

  1. Jon Leighton

    Revert "Remove :finder_sql, :counter_sql, :insert_sql, :delete_sql."

    This reverts commit 3803fcc.
    
    Conflicts:
    	activerecord/CHANGELOG.md
    
    It will be deprecated only in 4.0, and removed properly in 4.1.
    jonleighton authored

Jul 20, 2012

  1. Jon Leighton

    Remove :finder_sql, :counter_sql, :insert_sql, :delete_sql.

    jonleighton authored

Jun 22, 2012

  1. Andrew White

    Improve the derivation of HABTM assocation join table names

    Improve the derivation of HABTM join table name to take account of nesting.
    It now takes the table names of the two models, sorts them lexically and
    then joins them, stripping any common prefix from the second table name.
    
    Some examples:
    
      Top level models
      (Category <=> Product)
      Old: categories_products
      New: categories_products
    
      Top level models with a global table_name_prefix
      (Category <=> Product)
      Old: site_categories_products
      New: site_categories_products
    
      Nested models in a module without a table_name_prefix method
      (Admin::Category <=> Admin::Product)
      Old: categories_products
      New: categories_products
    
      Nested models in a module with a table_name_prefix method
      (Admin::Category <=> Admin::Product)
      Old: categories_products
      New: admin_categories_products
    
      Nested models in a parent model
      (Catalog::Category <=> Catalog::Product)
      Old: categories_products
      New: catalog_categories_products
    
      Nested models in different parent models
      (Catalog::Category <=> Content::Page)
      Old: categories_pages
      New: catalog_categories_content_pages
    
    Also as part of this commit the validity checks for HABTM assocations have
    been moved to ActiveRecord::Reflection One side effect of this is to move when
    the exceptions are raised from the point of declaration to when the association
    is built. This is consistant with other association validity checks.
    pixeltrix authored

May 18, 2012

  1. Jon Leighton

    fix #delete_all with habtm with :delete_sql

  2. Jon Leighton

    no longer need #delete_all_on_destroy

  3. Jon Leighton

    Perf: Don't load the association for #delete_all.

    Bug #6289

Dec 14, 2011

  1. Jon Leighton

    Fix #3672 again (dependent: delete_all perf)

    jonleighton authored

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

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

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

    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

    @join_table_name is no longer used

    jonleighton authored
  2. Jon Leighton

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

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

Jan 05, 2011

  1. Aaron Patterson

    avoid creating so many Arel::Table objects

    tenderlove authored
  2. Aaron Patterson

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

    tenderlove authored
  3. Aaron Patterson

    use arel ast construction rather than generating strings

    tenderlove authored
  4. Aaron Patterson

    use arel to construct AST rather than generate strings

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

    Create the association scope directly rather than going through with_…

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

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
Something went wrong with that request. Please try again.