aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fall back to parent locale before it falls back to the :errors namespaceHugo Vacher2019-03-041-2/+18
|
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-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
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-5/+5
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-4/+4
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-9/+9
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-10/+10
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* use the new clear_validators! api everywhere to reset validators in testsKuldeep Aggarwal2014-01-281-1/+1
|
* Fix bad test order dependency between ↵Ryan Davis2013-11-161-8/+16
| | | | test/cases/validations/i18n_generate_message_validation_test.rb and test/cases/validations/uniqueness_validation_test.rb
* Add tests to make sure that the I18n taken message can be overrided in theRafael Mendonça França2012-10-221-0/+14
| | | | | | activerecord scope. Related with 5341b84936d93ec90e6252af437a3871101c115a
* Changed scope for "taken" error message translation to decrease precedenceAndrew DiMichele2012-10-191-0/+5
| | | | | | Moved activerecord.errors.messages.taken to errors.messages.taken so that translations for, e.g., errors.attributes.email.taken don't get overridden. Test that the translation for 'taken' can be overridden
* Cleanup trailing whitespacesdfens2012-10-121-1/+1
|
* Tweak ↵Christopher Dell2012-03-051-1/+2
| | | | activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
* Test that RecordInvalid exception's translation falls back to the :errors ↵Christopher Dell2012-03-051-0/+18
| | | | namespace
* 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.
* removing unused models from testsSubba Rao Pasupuleti2010-07-211-1/+0
| | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-06-211-6/+6
| | | | | | | | | | | | | | | | 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>
* Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵Lawrence Pit2010-05-031-2/+2
| | | | | | 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-9/+1
| | | | I18n yml files.
* Move validator, human_name and human_attribute_name to ActiveModel, remove ↵José Valim2009-10-201-120/+9
| | | | | | 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-10/+2
| | | | | | 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-0/+129
| | | | ActiveRecord::Validations
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+37