Skip to content
Commits on Mar 7, 2012
  1. @josevalim

    Merge pull request #5316 from Jacobkg/master

    josevalim committed Mar 7, 2012
    Update ActiveRecord::AttributeMethods#attribute_present? to return false for empty strings
Commits on Jan 31, 2012
  1. @jonleighton

    Improve deprecation message

    jonleighton committed Jan 31, 2012
  2. @jonleighton
Commits on Jan 20, 2012
  1. @jonleighton

    Fix another race condition.

    jonleighton committed Jan 20, 2012
    From 2c667f6.
    Thanks @pwnall for the heads-up.
Commits on Jan 13, 2012
  1. @jonleighton

    Fix race condition :bomb:

    jonleighton committed Jan 13, 2012
Commits on Jan 11, 2012
  1. @spastorino

    Merge pull request #4408 from tomstuart/read-and-write-attribute-aliases

    spastorino committed Jan 11, 2012
    #[] and #[]= are no longer interchangeable with #read_attribute and #write_attribute
Commits on Dec 23, 2011
  1. @jonleighton
  2. @jonleighton

    Fix #4046.

    jonleighton committed Dec 23, 2011
Commits on Dec 15, 2011
  1. @jonleighton
  2. @jonleighton
Commits on Dec 14, 2011
  1. @jonleighton
Commits on Dec 1, 2011
  1. @jonleighton

    Remove the need for type_cast_attribute.

    jonleighton committed Dec 1, 2011
    This is good because it reduces duplication.
  2. @jonleighton

    Remove unnecessary *args

    jonleighton committed Dec 1, 2011
Commits on Sep 13, 2011
  1. @jonleighton

    Stop trying to be clever about when to define attribute methods.

    jonleighton committed Sep 13, 2011
    There is no meaningful performance penalty in defining attribute
    methods, since it only happens once.
    There is also no reason *not* to define them, since they get thrown in
    an included module, so they will not 'overwrite' anything. In fact, this
    is desirable, since it allows us to call super.
  2. @jonleighton

    We don't need to build a set for DangerousAttributeError.

    jonleighton committed Sep 13, 2011
    We can just use method_defined? and private_method_defined?
Commits on Sep 12, 2011
  1. @jonleighton

    Deprecate using method_missing for attributes that are columns.

    jonleighton committed Sep 12, 2011
    This shouldn't ever happen unless people are doing something
    particularly weird, but adding a deprecation in case there are bugs not
    caught by our tests.
  2. @jonleighton

    Let Ruby deal with method visibility.

    jonleighton committed Sep 12, 2011
    Check respond_to_without_attributes? in method_missing. If there is any
    method that responds (even private), let super handle it and raise
    NoMethodError if necessary.
  3. @jonleighton

    Always generate attribute methods on the base class.

    jonleighton committed Sep 11, 2011
    This fixes a situation I encountered where a subclass would cache the
    name of a generated attribute method in @_defined_class_methods. Then,
    when the superclass has it's attribute methods undefined, the subclass
    would always have to dispatch through method_missing, because the
    presence of the attribute in @_defined_class_methods would mean that it
    is never generated again, even if undefine_attribute_methods is called
    on the subclass.
    There various other confusing edge cases like this. STI classes share
    columns, so let's just keep all the attribute method generation state
    isolated to the base class.
  4. @jonleighton

    Fix warnings.

    jonleighton committed Sep 10, 2011
    Make sure we don't redefine an already-defined attribute method.
Commits on Jun 30, 2011
  1. @tenderlove
Commits on Mar 1, 2011
  1. @wildchild @josevalim

    Move ActiveModel::AttributeMethods#attribute_methods_generated? to Ac…

    wildchild committed with josevalim Feb 13, 2011
    …tiveRecord, so it's flexible now
    [#6428 state:resolved]
    Signed-off-by: José Valim <>
Commits on Feb 19, 2011
  1. @tenderlove
Commits on Feb 18, 2011
  1. @tenderlove
  2. @tenderlove
Commits on Dec 2, 2010
  1. @NZKoz @tenderlove

    Work around a strange piece of Syck behaviour where it checks Model#r…

    NZKoz committed with tenderlove Dec 2, 2010
    …espond_to? before initializing the object.
    Things like YAML.load(YAML.dump(@post)) won't work without this.
Commits on Oct 19, 2010
  1. @tenderlove
Commits on Sep 9, 2010
  1. @jeremy

    Cheaper attribute reads and respond_to?. Add underscore-prefixed meth…

    jeremy committed Aug 30, 2010
    …od aliased to the attribute name so it can be overridden but still called internally.
Commits on Jun 15, 2010
  1. @rizwanreza
Commits on May 8, 2010
  1. @wycats
Commits on Nov 14, 2009
  1. @jeremy
Commits on Aug 5, 2009
  1. @josh
Commits on Aug 4, 2009
  1. @josh


    josh committed Aug 4, 2009
  2. @paulgillard @josh

    Modified ActiveRecord::AttributeMethods to allow classes to specify a…

    paulgillard committed with josh Aug 4, 2009
    …ttribute method prefixes and/or suffixes. Previously only suffixes were allowed.
    Signed-off-by: Joshua Peek <>
Commits on Aug 3, 2009
  1. @josh
Commits on Jul 30, 2009
  1. @josh
Something went wrong with that request. Please try again.