Skip to content
This repository

Jul 27, 2012

  1. Jon Leighton

    ActiveRecord::Base.all returns a Relation.

    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.

Jul 24, 2012

  1. Andrey Morskov

    fix typo in callbacks test

    accessd authored

Jul 20, 2012

  1. Rafael Mendonça França

    Update documentation and change the range method name to delimiter.

    rafaelfranca authored
  2. Rafael Mendonça França

    Don't pass `:within` option to the i18n

    rafaelfranca authored
  3. Rafael Mendonça França

    `validates_inclusion_of` and `validates_exclusion_of` now accept

    `:within` option as alias of `:in` as documented.
    
    Fix #7118
    rafaelfranca authored

Jul 10, 2012

  1. Bogdan Gusiev

    AM::Validations: remove documentation duplicates

    bogdan authored

Jul 07, 2012

  1. Vijay Dev

    Merge branch 'master' of github.com:lifo/docrails

    vijaydev authored
  2. Carlos Antonio da Silva

    Merge pull request #6938 from acapilleri/as_json_refactoring

    Small refactoring of as_json method

Jul 06, 2012

  1. Francesco Rodríguez

    add :nodoc: to internal implementations of AM::Validator [ci skip]

    frodsan authored
  2. Francesco Rodríguez

    update ActiveModel::Serialization documentation [ci skip]

    frodsan authored

Jul 05, 2012

  1. Francesco Rodríguez

    fix syntax of AM::Validations::HelperMethods examples [ci skip]

    frodsan authored
  2. Francesco Rodríguez

    update ActiveModel::Validations::HelperMethods documentation [ci skip]

    frodsan authored
  3. Francesco Rodríguez

    update ActiveModel::Conversion documentation [ci skip]

    frodsan authored

Jul 03, 2012

  1. Angelo Capilleri

    small refactoring of as_json method

    with this change root has always one assignment
    acapilleri authored
  2. Angelo Capilleri

    observer update refactoring

    acapilleri authored

Jul 01, 2012

  1. Buddhika Laknath

    Changed attr_accessible example to reflect grouped roles

    Related to the request #5699 - #5699 and
    not documented.
    laknath authored

Jun 30, 2012

  1. Vijay Dev

    Merge branch 'master' of github.com:lifo/docrails

    Conflicts:
    	activemodel/lib/active_model/errors.rb
    vijaydev authored

Jun 27, 2012

  1. Carlos Antonio da Silva

    Refactor attribute method matcher to use Hash#fetch

  2. Carlos Antonio da Silva

    Cleanup attribute methods a bit, use map! when accepting *args

    Since we're dealing with a new array instance, it's safe to use map! and
    we avoid an extra array object.
    
    Also remove the symbolize_keys! from AttributeMethodMatcher, since it's
    an internal class that always receives symbol keys from the prefix/suffix
    methods implementations.
  3. Carlos Antonio da Silva

    Use default + merge! instead of reverse_merge

    Since we're not directly requiring the reverse_merge extension, we can
    avoid another hash creation by using default_hash.merge! instead.
  4. Carlos Antonio da Silva

    Set hash value instead of merge a single key, and use flatten! if pos…

    …sible
    
    There's no need to create two extra hashes with options.merge(another_hash),
    with the goal of setting only one value, so lets just set it.
    
    Also refactor validates_each to use _merge_attributes, like other
    validates_* helpers do.

Jun 25, 2012

  1. Francesco Rodríguez

    add :nodoc: to internal implementations [ci skip]

    frodsan authored
  2. Carlos Antonio da Silva

    Make internal callback model definitions private in AMo

    These _define class methods don't need to be exposed to objects that
    extend ActiveModel::Callbacks.
    
    Also use merge! options to avoid the creation of an extra hash.
  3. Francesco Rodríguez

    update ActiveModel::Name documentation [ci skip]

    frodsan authored
  4. Francesco Rodríguez

    fix punctuation in activemodel/errors [ci skip]

    frodsan authored

Jun 23, 2012

  1. Francesco Rodríguez

    update ActiveModel::Naming documentation

    frodsan authored
  2. Francesco Rodríguez

    update ActiveModel::Model documentation [ci skip]

    frodsan authored
  3. Francesco Rodríguez

    add description ActiveModel::StrictValidationField [ci skip]

    frodsan authored

Jun 22, 2012

  1. Francesco Rodríguez

    update ActiveModel::Lint documentation [ci skip]

    frodsan authored
  2. Francesco Rodríguez

    update ActiveModel::Errors#include? documentation [ci skip]

    frodsan authored
  3. Francesco Rodríguez

    add :nodoc: to internal implementations [ci skip]

    frodsan authored
  4. Francesco Rodríguez

    add documentation and examples to ActiveModel::Errors [ci skip]

    frodsan authored
  5. Francesco Rodríguez

    change param name to improve documentation

    The keys of the error messages are actually attribute names. It makes
    the documentation easier to understand:
    
        # Returns +true+ if the error messages include an error for the given
        # +attribute+, +false+ otherwise.
        #
        #   person.errors.messages # => { :name => ["can not be nil"] }
        #   person.errors.include?(:name) # => true
        #   person.errors.include?(:age)  # => false
        def include?(attribute)
          (v = messages[attribute]) && v.any?
        end
    frodsan authored
  6. Francesco Rodríguez

    update ActiveModel::Errors documentation and minor fixes [ci skip]

    frodsan authored
  7. Francesco Rodríguez

    update ActiveModel::Conversion documentation [ci skip]

    frodsan authored
Something went wrong with that request. Please try again.