aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/validations/i18n_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-06-211-22/+28
| | | | | | | | | | | | | | | | 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>
* removing dead code from activerecord tests. [#4187 state:resolved]Aaron Patterson2010-03-151-19/+0
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Drop AR I18n deprecation and simple use errors.messages as fallback.José Valim2010-01-301-7/+7
|
* Be sure to dup load paths before clearing the array.José Valim2010-01-071-1/+1
|
* Errors messages are now moved from :activerecord.errors to simply :errors on ↵José Valim2010-01-071-73/+24
| | | | I18n yml files.
* Simplify repair_validations on AR and make it work with new callbacks.José Valim2010-01-011-2/+2
|
* Move validator, human_name and human_attribute_name to ActiveModel, remove ↵José Valim2009-10-201-732/+0
| | | | | | deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche <carllerche@mac.com>
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-20/+4
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* allow ActiveRecord#RecordInvalid exception message to be localizedSven Fuchs2009-08-261-0/+188
| | | | | | [#2754 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge branch 'master' into active_modelJoshua Peek2009-05-291-3/+12
| | | | | | | | | | | Conflicts: activemodel/lib/active_model/core.rb activemodel/test/cases/state_machine/event_test.rb activemodel/test/cases/state_machine/state_transition_test.rb activerecord/lib/active_record/validations.rb activerecord/test/cases/validations/i18n_validation_test.rb activeresource/lib/active_resource.rb activeresource/test/abstract_unit.rb
* Add I18n translations to ActiveModel and move more AR specific parts to ↵Pratik Naik2009-03-201-0/+613
| | | | ActiveRecord::Validations
* Deprecate Error#on(attribute) in favour of Errors#[attribute]Pratik Naik2009-03-201-2/+2
|
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+89