Skip to content
This repository

Sep 22, 2012

  1. Francesco Rodríguez

    update AR::Validations documentation [ci skip]

    frodsan authored

Jul 30, 2012

  1. Francesco Rodríguez

    update AR::Validations::AssociatedValidator documentation [ci skip]

    frodsan authored

Jan 17, 2012

  1. validate related records in the same validation context as parent.

    E.G.:
    
    ```ruby
    class Parent < ActiveRecord::Base
      has_one :child
      validates_presence_of :name, :on => "custom_context"
      validates_associated :child
    end
    
    class Child < ActiveRecord::Base
      belongs_to :parent
      validates_presence_of :name, :on => "custom_context"
    end
    
    p = Parent.new(:name => "Montoto", :child => Child.new)
    p.valid?(:custom_context) # => Returns true, even though the child is not valid under the same context.
    ```
    Emmanuel Oga authored

Dec 04, 2011

  1. Olek Janiszewski

    Do not validate associated records marked for destruction

    The main reason for this change is to fix a bug where
    `validates_associated` would prevent `accepts_nested_attributes_for`
    with `allow_destroy: true` from destroying invalid associated records.
    exviva authored

Aug 04, 2011

  1. Vijay Dev

    make the warning clear about the effect of using validates_associated…

    … on both sides on an association.
    vijaydev authored fxn committed

May 23, 2011

  1. Sebastian Martinez

    Remove extra white spaces on ActiveRecord docs.

Feb 21, 2011

  1. Xavier Noria

    copy-edits 8d96b89

    fxn authored

Feb 19, 2011

  1. Clarification of ActiveRecord ActiveModel validation documentation

    Peer Allan authored

Aug 14, 2010

  1. Santiago Pastorino

    Deletes trailing whitespaces (over text files only find * -type f -ex…

    …ec sed 's/[ \t]*$//' -i {} \;)
    spastorino authored

Aug 02, 2010

  1. Neeraj Singh

    ensuring that description does not exceed 100 columns

    neerajdotname authored

Jun 21, 2010

  1. Jeroen van Dijk

    Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an opt…

    …ions hash and make various Validators pass their (filtered) options.
    
    This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format".
    
    Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation.
    
    Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options).
    
    Also, refactoring of ActiveModel and ActiveRecord Validation tests. Test are a lot more DRY now. Better test coverage as well now.
    
    The first four points were reapplied from an older patch of Sven Fuchs which didn't apply cleanly anymore and was not complete yet.
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
    jeroenvandijk authored josevalim committed

Jan 08, 2010

  1. José Valim

    Ensure new validates works with uniqueness validator.

    josevalim authored

Dec 23, 2009

  1. José Valim

    No need to use ValidationsRepairHelper hack on ActiveModel anymore, M…

    …odel.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
    josevalim authored
  2. José Valim

    ActiveRecord::Validations are now built on top of Validator as well.

    josevalim authored

Mar 21, 2009

  1. Pratik

    Move validate_on_create and validate_on_update from ActiveModel to Ac…

    …tiveRecord
    lifo authored

Mar 19, 2009

  1. Pratik

    Move uniqueness and association validations to Active Record

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