Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Oct 2, 2013
  1. Aaron Patterson

    remove HABTM associations

    tenderlove authored
Commits on Jul 2, 2013
  1. Neeraj Singh
  2. Neeraj Singh
Commits on Mar 9, 2013
  1. Ben Moss

    Deprecate #connection in favour of accessing it via the class

    benmoss authored
    This allows end-users to have a `connection` method on their models
    without clashing with ActiveRecord internals.
Commits on Aug 1, 2012
  1. Jon Leighton

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

    jonleighton authored
    This reverts commit 3803fcc.
    
    Conflicts:
    	activerecord/CHANGELOG.md
    
    It will be deprecated only in 4.0, and removed properly in 4.1.
Commits on Jul 20, 2012
  1. Jon Leighton
Commits on Jun 22, 2012
  1. Andrew White

    Improve the derivation of HABTM assocation join table names

    pixeltrix authored
    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.
Commits on May 18, 2012
  1. Jon Leighton
  2. Jon Leighton
  3. Jon Leighton
Commits on Dec 14, 2011
  1. Jon Leighton
Commits on Aug 8, 2011
  1. Jon Leighton

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

    jonleighton authored
    …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.
Commits on May 31, 2011
  1. Jon Leighton
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

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

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

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

    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 16, 2011
  1. Jon Leighton Aaron Patterson

    Removed support for accessing attributes on a has_and_belongs_to_many…

    jonleighton authored tenderlove committed
    … 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.
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 5, 2011
  1. Aaron Patterson
  2. Aaron Patterson
  3. Aaron Patterson
  4. Aaron Patterson
Commits on Jan 4, 2011
  1. Raimonds Simanovskis

    Explicitly select * from has_and_belongs_to_many association tables, …

    rsim authored
    …simplify exists? query
    
    Previous version (after commit 3103296) was generating wrong SQL for Oracle when calling exists? method on HABTM association.
  2. Jon Leighton Aaron Patterson
  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
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
Something went wrong with that request. Please try again.