aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29fAkira Matsuda2019-08-021-1/+1
|
* Use frozen string literal in activemodel/Kir Shatrov2017-07-161-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* applies new string literal convention in activemodel/testXavier Noria2016-08-061-23/+23
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Deprecate `ActiveModel::Errors` `add_on_empty` and `add_on_blank` methodsWojciech Wnętrzak2015-02-191-1/+1
| | | | without replacement.
* Add singular and plural form for some validation messagesAbd ar-Rahman Hamidi2014-05-021-3/+15
|
* Use the new clear_validators! api to reset validators in testsCarlos Antonio da Silva2014-01-271-1/+1
|
* Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-011-25/+25
| | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
* convert comments to 1.9 hash syntaxAvnerCohen2012-10-221-12/+12
|
* confirmation validation error attributeBrian Cardarella2012-04-231-1/+1
| | | | | | | | | | | | This will render the error message on :#{attribute}_confirmation instead of on attribute itself. When rendering confirmation errors inline on the form with form builders such as SimpleForm and Formtastic it is confusing to the ender user to see the confirmation error message on the attribute element. Instead it makes more sense to have this validation error render on the confirmation field instead. The i18n message has been updated for the confirmation validator error message to include the original attribute name.
* Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-06-211-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). 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>
* 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