aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an ↵José Valim2010-05-151-41/+41
| | | | | | | | options hash and make various Validators pass their (filtered) options." Having a huge array to whitelist options is not the proper way to handle this case. This means that the ActiveModel::Errors object should know about the options given in *all* validators and break the extensibility added by the validators itself. If the intent is to whitelist options before sending them to I18n, each validator should clean its respective options instead of throwing the responsibility to the Errors object. This reverts commit bc1c8d58ec45593acba614d1d0fecb49adef08ff.
* Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-05-151-41/+41
| | | | | | | | | | | | | | | | | | | | 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). Original patch by Sven Fuchs, some minor changes and has been changed to be applicable to master again [#4057 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* removed AR from all AMo tests, including any unneeded files (schema, ↵Josh Kalderimis2010-05-091-1/+0
| | | | fixtures and test helper)
* Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵Lawrence Pit2010-05-031-7/+7
| | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com>
* Errors messages are now moved from :activerecord.errors to simply :errors on ↵José Valim2010-01-071-36/+0
| | | | I18n yml files.
* Move validator, human_name and human_attribute_name to ActiveModel, remove ↵José Valim2009-10-201-1/+0
| | | | | | deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche <carllerche@mac.com>
* Use ActiveModel::TestCase base classJeremy Kemper2009-09-241-1/+1
|
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-7/+1
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add I18n translations to ActiveModel and move more AR specific parts to ↵Pratik Naik2009-03-201-37/+45
| | | | ActiveRecord::Validations
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+174