Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Mar 2, 2015
  1. @sgrif

    Merge pull request #19077 from robin850/unknown-attribute-error

    sgrif authored
    Move `UnknownAttributeError` to a more sane namespace
Commits on Feb 27, 2015
  1. @vipulnsward

    Removed non-standard and unused require 'active_support/deprecation' …

    vipulnsward authored
    …from parts out of active_support.
Commits on Feb 26, 2015
  1. @robin850

    Follow-up to #10776

    robin850 authored
    The name `ActiveModel::AttributeAssignment::UnknownAttributeError` is
    too implementation specific so let's move the constant directly under
    the ActiveModel namespace.
    Also since this constant used to be under the ActiveRecord namespace, to
    make the upgrade path easier, let's avoid raising the former constant
    when we deal with this error on the Active Record side.
Commits on Feb 24, 2015
  1. @ianks

    activemodel: make .model_name json encodable

    ianks authored
    Previously, calling `User.model_name.to_json` would result in an infinite
    recursion as `.model_name` inherited its `.as_json` behavior from Object. This
    patch fixes that unexpected behavior by delegating `.as_json` to :name.
Commits on Feb 20, 2015
  1. @rafaelfranca
  2. @morgoth
  3. @lucasmazza
  4. @rafaelfranca

    Merge pull request #17144 from skojin/patch-doc-validation-format-z-r…

    rafaelfranca authored
    fix mistype in doc about \z regexp
  5. @y-yagi
Commits on Feb 19, 2015
  1. @senny

    Merge pull request #18996 from morgoth/deprecate-more-errors-methods

    senny authored
    Deprecate `ActiveModel::Errors` `add_on_empty` and `add_on_blank` methods
  2. @morgoth

    Deprecate `ActiveModel::Errors` `add_on_empty` and `add_on_blank` met…

    morgoth authored
    without replacement.
Commits on Feb 18, 2015
  1. @rafaelfranca

    Merge pull request #18634 from morgoth/deprecate-some-errors-methods

    rafaelfranca authored
    Deprecate `ActiveModel::Errors` `get`, `set` and `[]=` methods.
Commits on Feb 15, 2015
  1. @robin850
Commits on Feb 14, 2015
  1. @vijaydev
Commits on Feb 13, 2015
  1. @rafaelfranca

    Merge pull request #16381 from kakipo/validate-length-tokenizer

    rafaelfranca authored
    Allow symbol as values for `tokenizer` of `LengthValidator`
Commits on Feb 6, 2015
  1. @rafaelfranca

    Merge pull request #18388 from claudiob/better-docs-for-active-model-…

    rafaelfranca authored
    Better docs for AM::Lint::Tests
  2. @fxn

    revises AM:Dirty example [Godfrey Chan & Xavier Noria]

    fxn authored
    The existing example seems somewhat forced: is it realistic
    to have a model that accepts state in its initializer but
    considers it has not been changed? By allowing state changes
    to happen only via accessors it seems more natural that new
    instances are considered to be unchanged (as they are in AR).
    [ci skip]
  3. @fxn
  4. @fxn
Commits on Feb 3, 2015
  1. @carlosantoniodasilva

    Wrap method arguments with parentheses in docs

    carlosantoniodasilva authored
    As per Rails general coding conventions. Related to #18794 [ci skip]
  2. @vipulnsward

    Person class doesn't contain finder methods, hence usage of…

    vipulnsward authored
    …nd_by is wrong.
    Added simple initialize and made use of instead of Person.find_by to clarify the docs.
    [ci skip]
Commits on Feb 2, 2015
  1. @eileencodes

    Fix validations on child record when record parent has validate: false

    eileencodes authored
    Fixes #17621. This 5 year old (or older) issue causes validations to fire
    when a parent record has `validate: false` option and a child record is
    saved. It's not the responsibility of the model to validate an
    associated object unless the object was created or modified by the
    Clean up tests related to validations
    `assert_nothing_raised` is not benefiting us in these tests
    Corrected spelling of "respects"
    It's better to use `assert_not_operator` over `assert !r.valid`
Commits on Feb 1, 2015
  1. @carlosantoniodasilva

    Move required error message and changelog to Active Record

    carlosantoniodasilva authored
    The new association error belongs to Active Record, not Active Model.
    See #18700 for reference.
  2. @morgoth

    Deprecate `ActiveModel::Errors` `get`, `set` and `[]=` methods.

    morgoth authored
    They have inconsistent behaviour currently.
  3. @vipulnsward

    AM#Dirty doc fixes

    vipulnsward authored
    - Grammar fixes
    - Add doc for changes_include?
    -  implemntations => implementations
Commits on Jan 31, 2015
  1. @vipulnsward
Commits on Jan 28, 2015
  1. @nygrenh
Commits on Jan 24, 2015
  1. @senny

    Merge pull request #18670 from morgoth/fix-duplicating-errors-details

    senny authored
    Fixed duplicating ActiveModel::Errors#details
  2. @morgoth
Commits on Jan 23, 2015
  1. @egilburg
  2. @sgrif

    ✂️ and 💅 for #10776

    sgrif authored
    Minor style changes across the board. Changed an alias to an explicit
    method declaration, since the alias will not be documented otherwise.
  3. @bogdan

    Extracted `ActiveRecord::AttributeAssignment` to `ActiveModel::Attrib…

    bogdan authored
    Allows to use it for any object as an includable module.
Commits on Jan 21, 2015
  1. @rafaelfranca

    Merge pull request #18322 from morgoth/add-error-codes

    rafaelfranca authored
    Add ActiveModel::Errors#codes
  2. @morgoth
Commits on Jan 20, 2015
  1. @morgoth

    Add ActiveModel::Errors#details

    morgoth authored
    To be able to return type of validator, one can now call `details`
    on Errors instance:
    class User < ActiveRecord::Base
      validates :name, presence: true
    user =; user.valid?; user.errors.details
    => {name: [{error: :blank}]}
Something went wrong with that request. Please try again.