Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Mar 15, 2013
  1. @senny

    rename `Relation#uniq` to `Relation#distinct`. `#uniq` still works.

    senny authored
    The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our
    Relation API is close to SQL terms I renamed `#uniq` to `#distinct`.
    
    There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue
    to work. I also updated the documentation to promote the use of `#distinct`.
Commits on Feb 24, 2013
  1. @senny

    remove AR auto-explain (config.auto_explain_threshold_in_seconds)

    senny authored
    We discussed that the auto explain feature is rarely used.
    This PR removes only the automatic explain. You can still display
    the explain output for any given relation using `ActiveRecord::Relation#explain`.
    
    As a side-effect this should also fix the connection problem during
    asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie`
    forced a connection.
Commits on Jan 29, 2013
  1. @carlosantoniodasilva
Commits on Dec 1, 2012
  1. @alvaropereyra
Commits on Oct 19, 2012
  1. @jonleighton

    Add Relation#find_or_create_by and friends

    jonleighton authored
    This is similar to #first_or_create, but slightly different and a nicer
    API. See the CHANGELOG/docs in the commit.
    
    Fixes #7853
Commits on Aug 3, 2012
  1. @jonleighton

    Remove ActiveRecord::Base.to_a

    jonleighton authored
    On reflection, it seems like a bit of a weird method to have on
    ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
Commits on Aug 2, 2012
  1. @fxn
  2. @fxn
Commits on Jul 27, 2012
  1. @jonleighton

    ActiveRecord::Base.all returns a Relation.

    jonleighton authored
    Previously it returned an Array.
    
    If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This
    is more explicit.
    
    In most cases this should not break existing code, since
    Relations use method_missing to delegate unknown methods to #to_a
    anyway.
Commits on Jul 17, 2012
  1. @kennyj
Commits on May 3, 2012
  1. @mhfs
Commits on Apr 30, 2012
  1. @pixeltrix

    Fix PR #6091

    pixeltrix authored
    1. ActiveRecord::Base is not ActiveRecord::Relation
    2. The order of records from an SQL query is uncertain without an ORDER clause
    3. Run your own tests when submitting a pull request
Commits on Mar 30, 2012
  1. @jonleighton
Commits on Feb 7, 2012
  1. @tenderlove
Commits on Jan 31, 2012
  1. @jonleighton

    Merge pull request #4805 from xuanxu/none_and_null_object_pattern

    jonleighton authored
    Added `none` query method to return zero records.
  2. @tenderlove
  3. @tenderlove
  4. @xuanxu

    Added `none` query method to return zero records.

    xuanxu authored
    And added NullRelation class implementing the null object pattern for the `Relation` class.
Commits on Jan 16, 2012
  1. @jonleighton
Commits on Dec 15, 2011
  1. @jonleighton
Something went wrong with that request. Please try again.