Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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 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 Nov 29, 2011
  1. @jonleighton

    Deprecated `define_attr_method` in `ActiveModel::AttributeMethods`

    jonleighton authored
    This only existed to support methods like `set_table_name` in Active
    Record, which are themselves being deprecated.
Commits on Sep 13, 2011
  1. @jonleighton

    Generate attribute method unless it's already in the module.

    jonleighton authored
    There's no harm in generating a method name that's already defined on
    the host class, since we're generating the attribute methods in a module
    that gets included. In fact, this is desirable as it allows the host
    class to call super.
Commits on Sep 12, 2011
  1. @jonleighton

    Add an attribute_missing method to ActiveModel::AttributeMethods.

    jonleighton authored
    This can be overloaded by implementors if necessary.
  2. @jonleighton

    Avoid double super call in some cases.

    jonleighton authored
    If super was false earlier, it is still going to be false, so we don't
    need to call it again at the end of the method.
  3. @jonleighton

    Let Ruby deal with method visibility.

    jonleighton authored
    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.
  4. @jonleighton
  5. @jonleighton

    refactoring

    jonleighton authored
  6. @jonleighton

    Use an empty AttributeMethodMatcher by default.

    jonleighton authored
    This means that attribute methods which don't exist will get generated
    when define_attribute_methods is called, so we don't have to use hacks
    like `attribute_method_suffix ''`.
Something went wrong with that request. Please try again.