aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/with.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-071-18/+29
| | | | | | | | | | | | | | | attributes: class Person < ActiveRecord::Base include MyValidators validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 } validates :email, :presence => true, :email => true end [#3058 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* validates_each uses a BlockValidator.José Valim2009-12-231-2/+2
|
* Move validations in ActiveModel to validators, however all validatity checks ↵José Valim2009-12-231-4/+1
| | | | are still in the class method.
* Validator is simply sent to validate method. However, the API needs to ↵José Valim2009-12-221-5/+3
| | | | change, so validate accepts a record.
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-1/+1
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Introduce validates_with to encapsulate attribute validations in a class.Jeff Dean2009-08-091-0/+64
[#2630 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>