Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Apr 6, 2013
  1. @agis-
Commits on Mar 23, 2013
  1. @neerajdotname

    unscoped works with named scope [ci skip]

    neerajdotname authored
    Update comment to reflect that unscoped works with named scope
    even when named scope is using without block form
Commits on Jan 29, 2013
  1. @carlosantoniodasilva
Commits on Oct 30, 2012
  1. @gazay
Commits on Oct 29, 2012
  1. @nikitug

    Provide a call stack for deprecation warnings where needed.

    nikitug authored
    It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly.
Commits on Sep 22, 2012
  1. @frodsan
Commits on Aug 2, 2012
  1. @fxn
  2. @fxn
Commits on Jul 1, 2012
  1. @frodsan
Commits on Jun 15, 2012
  1. @jonleighton

    Simplify AR configuration code.

    jonleighton authored
    Get rid of ActiveModel::Configuration, make better use of
    ActiveSupport::Concern + class_attribute, etc.
Commits on Apr 25, 2012
  1. @jonleighton
  2. @jonleighton
Commits on Apr 11, 2012
  1. @dcurtis
Commits on Mar 21, 2012
  1. @jonleighton

    Deprecate eager-evaluated scopes.

    jonleighton authored
    Don't use this:
    
        scope :red, where(color: 'red')
        default_scope where(color: 'red')
    
    Use this:
    
        scope :red, -> { where(color: 'red') }
        default_scope { where(color: 'red') }
    
    The former has numerous issues. It is a common newbie gotcha to do
    the following:
    
        scope :recent, where(published_at: Time.now - 2.weeks)
    
    Or a more subtle variant:
    
        scope :recent, -> { where(published_at: Time.now - 2.weeks) }
        scope :recent_red, recent.where(color: 'red')
    
    Eager scopes are also very complex to implement within Active
    Record, and there are still bugs. For example, the following does
    not do what you expect:
    
        scope :remove_conditions, except(:where)
        where(...).remove_conditions # => still has conditions
Commits on Dec 28, 2011
  1. @jonleighton

    Support configuration on ActiveRecord::Model.

    jonleighton authored
    The problem: We need to be able to specify configuration in a way that
    can be inherited to models that include ActiveRecord::Model. So it is
    no longer sufficient to put 'top level' config on ActiveRecord::Base,
    but we do want configuration specified on ActiveRecord::Base and
    descendants to continue to work.
    
    So we need something like class_attribute that can be defined on a
    module but that is inherited when ActiveRecord::Model is included.
    
    The solution: added ActiveModel::Configuration module which provides a
    config_attribute macro. It's a bit specific hence I am not putting this
    in Active Support or making it a 'public API' at present.
Commits on Dec 18, 2011
  1. @htanata
Commits on Dec 15, 2011
  1. @jonleighton
Something went wrong with that request. Please try again.