Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Call human_attribute_name with a string instead of a symbole | Martin Larochelle | 2018-08-16 | 1 | -1/+1 |
| | |||||
* | `ActiveModel.full_message` interaction with `index_errors` | Martin Larochelle | 2018-08-14 | 1 | -0/+57 |
| | |||||
* | Add global config for config.active_model.i18n_full_message | Martin Larochelle | 2018-06-05 | 1 | -0/+23 |
| | |||||
* | Allow to override the full_message error format | Martin Larochelle | 2018-05-22 | 1 | -0/+36 |
| | |||||
* | Use frozen string literal in activemodel/ | Kir Shatrov | 2017-07-16 | 1 | -0/+2 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | Fix broken comments indentation caused by rubocop auto-correct [ci skip] | Ryuta Kamizono | 2016-09-14 | 1 | -1/+1 |
| | | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency. | ||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -5/+5 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | applies remaining conventions across the project | Xavier Noria | 2016-08-06 | 1 | -1/+0 |
| | |||||
* | applies new string literal convention in activemodel/test | Xavier Noria | 2016-08-06 | 1 | -41/+41 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | pass the correct argument to mock on a test of `validates_length_of` | yuuji.yaginuma | 2015-07-28 | 1 | -1/+1 |
| | |||||
* | Removes unnecessary comments from i18n validations tests [ci skip] | Zamith | 2015-07-11 | 1 | -61/+2 |
| | | | | | | These comments do not add a lot to the readability, grepability or overall understanding of the tests, therefore I believe they can be safely removed. | ||||
* | Remove the reference to mocha in activemodel | Zamith | 2015-07-11 | 1 | -27/+27 |
| | | | | | Activemodel is no longer dependent on mocha, so we can make the comments more generic. | ||||
* | Use private method call assertions in Active Model tests. | Kasper Timm Hansen | 2015-07-10 | 1 | -34/+31 |
| | | | | Also fix Minitest constant reference. | ||||
* | Fix typo in AM I18n validation test name [skip ci] | Anton Davydov | 2015-06-09 | 1 | -1/+1 |
| | |||||
* | Remove use of mocha from Active Model | Roque Pinel | 2015-05-28 | 1 | -32/+66 |
| | |||||
* | Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵ | Vipul A M | 2015-02-03 | 1 | -2/+0 |
| | | | | onwards. | ||||
* | Run ActiveModel test suites in random order. | Zuhao Wan | 2014-03-10 | 1 | -0/+1 |
| | | | | | | | | | | This gets the whole ActiveModel test suites working even if `self.i_suck_and_my_tests_are_order_dependent!` is disabled in `ActiveSupport::TestCase`. Two places are found that potentially leak global state. This patch makes sure states are restored so that none of the changes happen in a single test will be carried over to subsequence tests. | ||||
* | Use the new clear_validators! api to reset validators in tests | Carlos Antonio da Silva | 2014-01-27 | 1 | -2/+2 |
| | |||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 1 | -59/+58 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | use Array() instead flatten | Vasiliy Ermolovich | 2012-11-05 | 1 | -20/+0 |
| | | | | | * move ActiveModel::Errors tests to errors_test.rb * add spec coverage for add_on_empty and add_on_blank | ||||
* | Don't pass `:within` option to the i18n | Rafael Mendonça França | 2012-07-20 | 1 | -0/+22 |
| | |||||
* | prevent users from unknowingly using bad regexps that can compromise ↵ | MrBrdo | 2012-06-14 | 1 | -2/+2 |
| | | | | security (http://homakov.blogspot.co.uk/2012/05/saferweb-injects-in-various-ruby.html) | ||||
* | Support i18n attributes for confirmation | Brian Cardarella | 2012-04-24 | 1 | -1/+1 |
| | |||||
* | confirmation validation error attribute | Brian Cardarella | 2012-04-23 | 1 | -6/+11 |
| | | | | | | | | | | | | 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. | ||||
* | Revert "Properly interpolate i18n keys in modules [#5572 state:resolved]" | Santiago Pastorino | 2011-02-27 | 1 | -19/+0 |
| | | | | | | | This breaks #6448, you should use :"module/class" as key for namespacing [#6448 state:committed] This reverts commit 8d30193b08bd2321a7a78a1f481bd5e4d4d45557. | ||||
* | Properly interpolate i18n keys in modules [#5572 state:resolved] | Rodrigo Rosenfeld Rosas | 2010-09-24 | 1 | -0/+19 |
| | |||||
* | Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵ | Jeroen van Dijk | 2010-06-21 | 1 | -338/+169 |
| | | | | | | | | | | | | | | | | 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 Kalderimis | 2010-05-09 | 1 | -3/+1 |
| | | | | fixtures and test helper) | ||||
* | Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵ | Lawrence Pit | 2010-05-03 | 1 | -1/+1 |
| | | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix validates_numericaly_of only integer error message [#4406 state:resolved] | reu | 2010-04-25 | 1 | -9/+9 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | errors.rb needs to be declared as UTF-8 [#3941 state:resolved] | Aaron Patterson | 2010-04-02 | 1 | -0/+10 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Drop AR I18n deprecation and simple use errors.messages as fallback. | José Valim | 2010-01-30 | 1 | -14/+14 |
| | |||||
* | Be sure to dup load paths before clearing the array. | José Valim | 2010-01-07 | 1 | -1/+1 |
| | |||||
* | Errors messages are now moved from :activerecord.errors to simply :errors on ↵ | José Valim | 2010-01-07 | 1 | -44/+44 |
| | | | | I18n yml files. | ||||
* | Remove deprecated ActiveModel tests (%d and %s is no longer supported in ↵ | José Valim | 2010-01-02 | 1 | -14/+0 |
| | | | | error messages a couple months already) | ||||
* | Use activerecord.errors.format as in Rails 2.3.5. | José Valim | 2010-01-02 | 1 | -0/+6 |
| | |||||
* | Be sure to convert namespaced names to we have 'Parrots name' instead of ↵ | José Valim | 2010-01-02 | 1 | -1/+1 |
| | | | | 'Parrots.name' in error messages. | ||||
* | No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵ | José Valim | 2009-12-23 | 1 | -1/+0 |
| | | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there. | ||||
* | Move validator, human_name and human_attribute_name to ActiveModel, remove ↵ | José Valim | 2009-10-20 | 1 | -0/+8 |
| | | | | | | 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é Valim | 2009-09-08 | 1 | -10/+3 |
| | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Fix warnings in AMo | Joshua Peek | 2009-09-05 | 1 | -45/+1 |
| | |||||
* | Merge branch 'master' into active_model | Joshua Peek | 2009-05-29 | 1 | -20/+8 |
| | | | | | | | | | | | 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 Naik | 2009-03-20 | 1 | -356/+275 |
| | | | | ActiveRecord::Validations | ||||
* | Deprecate Error#on(attribute) in favour of Errors#[attribute] | Pratik Naik | 2009-03-20 | 1 | -30/+30 |
| | |||||
* | TestDatabase -> TestsDatabase | Pratik Naik | 2009-03-20 | 1 | -1/+1 |
| | |||||
* | Move relevant validation tests from Active Record to Active Model | Pratik Naik | 2009-03-20 | 1 | -0/+672 |