Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 15, 2013
  1. Yves Senn

    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. Yves Senn

    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. Carlos Antonio da Silva
Commits on Dec 1, 2012
  1. Alvaro Pereyra Rabanal
Commits on Oct 19, 2012
  1. Jon Leighton

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

    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. Xavier Noria
  2. Xavier Noria
Commits on Jul 27, 2012
  1. Jon Leighton

    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. Toshinori Kajihara
Commits on May 3, 2012
  1. Marcelo Silveira
Commits on Apr 30, 2012
  1. Andrew White

    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. Jon Leighton
Commits on Feb 7, 2012
  1. Aaron Patterson
Commits on Jan 31, 2012
  1. Jon Leighton

    Merge pull request #4805 from xuanxu/none_and_null_object_pattern

    jonleighton authored
    Added `none` query method to return zero records.
  2. Aaron Patterson
  3. Aaron Patterson
  4. Juanjo Bazán

    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. Jon Leighton
Commits on Dec 15, 2011
  1. Jon Leighton
Something went wrong with that request. Please try again.