aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo by renaming :genre to :gender.José Valim2010-01-091-1/+1
|
* Allow validates to map some types to specific options. So now you can do:José Valim2010-01-081-1/+1
| | | | | | validates :email, :presence => true, :format => /@/ validates :genre, :inclusion => %w(m f) validates :password, :length => 6..20
* Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in ↵José Valim2010-01-071-0/+4
| | | | validates.
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-072-2/+11
| | | | | | | | | | | | | | | 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>
* No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵José Valim2009-12-231-1/+1
| | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
* Small clean up in Naming and TTranslation tests.José Valim2009-12-232-0/+8
|
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-3/+3
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Allow validations to use values from custom readers [#2936 state:resolved]James Hill2009-08-051-0/+17
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Dasherize XML root by default to avoid invalid tags ↵Joshua Peek2009-07-221-0/+4
| | | | "<admin/posts>...</admin/posts>" [#2875 state:resolved]
* Initial extraction of AMo xml serializerJoshua Peek2009-07-031-0/+3
|
* Deprecate Model#validate/validate_on_create/validate_on_update. Use ↵Pratik Naik2009-03-211-3/+7
| | | | Model.validate :method and likewise
* Add ActiveModel::Validations tests for regular ruby classesPratik Naik2009-03-202-1/+3
|
* Add I18n translations to ActiveModel and move more AR specific parts to ↵Pratik Naik2009-03-201-0/+5
| | | | ActiveRecord::Validations
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-203-0/+43