aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecations in ActiveModel.José Valim2010-08-291-36/+0
|
* after_validation should be called irrespective of the result of validation.Neeraj Singh2010-08-201-0/+2
| | | | | | | | 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-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* ActiveModel::Errors json serialization to work as Rails 3b4 [#5254 ↵Alex Le2010-08-021-3/+5
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Work around the fact the JSON gem was overwriting to_json implementation for ↵José Valim2010-06-261-6/+15
| | | | | | | all Ruby core classes. This is required because the JSON gem is incompatible with Rails behavior and was not allowing ActiveModel::Errors to be serialized. So we need to ensure Rails implementation is the one triggered. [#4890 state:resolved]
* Regression with how base errors messages are added to a model. Works ↵Josh Kalderimis2010-06-231-3/+18
| | | | | | correctly for both string error messages and symbol translated messages. Signed-off-by: José Valim <jose.valim@gmail.com>
* Make use of assert_equal to test equallity between object assert expects and ↵Santiago Pastorino2010-05-161-1/+1
| | | | | | | | object and a message of error [#4611 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* validation macros can now be used within an instanceJosh Kalderimis2010-05-131-0/+13
|
* removed AR from all AMo tests, including any unneeded files (schema, ↵Josh Kalderimis2010-05-091-11/+9
| | | | fixtures and test helper)
* removed an old unused model in the AMo tests which also removes another AR ↵Josh Kalderimis2010-05-091-1/+0
| | | | dependency
* removed use of AR in AMo tests and removed testing of scopes (:on) in ↵Josh Kalderimis2010-05-081-32/+34
| | | | individual validation tests and moved them to their own test file
* Re-define empty? for errors to check if the values inside the OrderedHash ↵Ryan Bigg2010-04-101-0/+6
| | | | | | are empty rather than the OrderedHash itself. [#4356 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add validators reflection so you can do 'Person.validators' and ↵Prem Sichanugrist2010-02-211-0/+27
| | | | | | 'Person.validators_on(:name)'. Signed-off-by: José Valim <jose.valim@gmail.com>
* Adding Proc support to validation messages so that they can become a little ↵Samuel Elliott2010-01-171-0/+8
| | | | | | more dynamic, allowing for customisations during the request [#3514 status:resolved]. Signed-off-by: José Valim <jose.valim@gmail.com>
* Be sure to convert namespaced names to we have 'Parrots name' instead of ↵José Valim2010-01-021-0/+6
| | | | 'Parrots.name' in error messages.
* No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵José Valim2009-12-231-2/+3
| | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
* Ensure validation errors to be ordered in declared orderAkira Matsuda2009-09-111-0/+16
| | | | | | [#2301 state:committed milestone:2.3.5] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* 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/+14
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Deprecate Errors#on_base/add_to_base/invalid?/each_fullPratik Naik2009-03-211-6/+18
|
* Validation tests arent using any fixturesPratik Naik2009-03-201-2/+0
|
* Deprecate Error#on(attribute) in favour of Errors#[attribute]Pratik Naik2009-03-201-1/+25
|
* TestDatabase -> TestsDatabasePratik Naik2009-03-201-2/+2
|
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+144