aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models
Commit message (Collapse)AuthorAgeFilesLines
...
* Test to_model being called in ActiveModel::Naming helpersErnie Miller2010-10-041-0/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Properly interpolate i18n keys in modules [#5572 state:resolved]Rodrigo Rosenfeld Rosas2010-09-241-0/+5
|
* Better shortcut options for custom validators [#5672 state:resolved]Obie Fernandez2010-09-241-0/+13
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Prepared ActiveModel::Naming to handle cases for namespaced isolated enginesPiotr Sarnacki2010-09-031-0/+13
|
* after_validation should be called irrespective of the result of validation.Neeraj Singh2010-08-201-0/+9
| | | | | | | | I confirmed that this is the behavior on 2.3.x . [5419 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-143-4/+3
| | | | 's/[ \t]*$//' -i {} \;)
* Reuse already existing classes for ActiveModel tests.José Valim2010-07-212-0/+5
|
* mass_assignment_security moved from AR to AMo, and minor test cleanupJosh Kalderimis2010-07-081-0/+57
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* validation macros can now be used within an instanceJosh Kalderimis2010-05-131-0/+12
|
* removed an old unused model in the AMo tests which also removes another AR ↵Josh Kalderimis2010-05-091-6/+0
| | | | dependency
* removed use of AR in AMo tests and removed testing of scopes (:on) in ↵Josh Kalderimis2010-05-082-10/+18
| | | | individual validation tests and moved them to their own test file
* test cases for record.to_xml [#458 state:resolved]Neeraj Singh2010-04-301-0/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix AMo isolated tests.José Valim2010-02-221-1/+1
|
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-3/+3
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Add to_key and to_param methods to ActiveModel::Conversion.José Valim2010-02-211-1/+7
|
* 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