Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add ActiveModel::Errors#details | Wojciech Wnętrzak | 2015-01-20 | 1 | -0/+42 |
| | | | | | | | | | | | | | | | | To be able to return type of validator, one can now call `details` on Errors instance: ```ruby class User < ActiveRecord::Base validates :name, presence: true end ``` ```ruby user = User.new; user.valid?; user.errors.details => {name: [{error: :blank}]} ``` | ||||
* | Add #key? to ActiveModel::Errors | Garry Shutler | 2014-10-14 | 1 | -0/+11 |
| | | | | Mirror Ruby's Hash#key? | ||||
* | Tests for indifferent access using full_messages_for. Closes #11916 | Pavel Penkov | 2014-03-08 | 1 | -0/+7 |
| | |||||
* | Update ActiveModel::Errors.has_key? test | Adrien Coquio | 2014-01-22 | 1 | -1/+1 |
| | |||||
* | Add failing test for ActiveModel::Errors#has_key? method | Adrien Coquio | 2014-01-22 | 1 | -0/+5 |
| | | | | From the doc, this method should return false and not nil if there is no errors for this key | ||||
* | Change all "can not"s to the correct "cannot". | T.J. Schuck | 2014-01-03 | 1 | -33/+33 |
| | |||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 1 | -4/+4 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | Review some tests from AMo::Errors to remove "should" usage | Carlos Antonio da Silva | 2013-03-30 | 1 | -55/+35 |
| | | | | | Also remove duplicated tests for Errors#as_json and minor improvements in some tests. | ||||
* | Merge pull request #8527 from shockone/patch-1 | Rafael Mendonça França | 2013-03-25 | 1 | -0/+20 |
|\ | | | | | Add a method full_messages_for to the Errors class | ||||
| * | Add a method full_messages_for to the Errors class | shock_one | 2013-03-24 | 1 | -0/+20 |
| | | |||||
* | | Add Error#full_message test; Fix typos | Vipul A M | 2013-03-22 | 1 | -0/+1 |
|/ | | | | | Introduce test on Error#full_message for attribute with underscores; Fix some typos | ||||
* | added more accurate test for add_on_empty | Angelo capilleri | 2013-02-19 | 1 | -0/+7 |
| | | | | | with the current tests, if delete the assignment of is_empty in add_on_empty method the tests not fail. With this test, if we delete is_empty, the test fails | ||||
* | Covering untested methods for ActiveModel::Errors | Attila Domokos | 2013-01-10 | 1 | -0/+53 |
| | |||||
* | Actually test that ActiveModel::Errors#add defaults to :invalid. | Renato Mascarenhas | 2012-12-01 | 1 | -1/+1 |
| | |||||
* | Call `full_messages` instead of `to_a` in its spec. | Renato Mascarenhas | 2012-12-01 | 1 | -2/+1 |
| | |||||
* | use Array() instead flatten | Vasiliy Ermolovich | 2012-11-05 | 1 | -1/+39 |
| | | | | | * move ActiveModel::Errors tests to errors_test.rb * add spec coverage for add_on_empty and add_on_blank | ||||
* | AM::Errors: allow :full_messages parameter for #as_json | Bogdan Gusiev | 2012-02-20 | 1 | -0/+10 |
| | |||||
* | test title changed corresponding to the test | prasath | 2012-02-09 | 1 | -1/+1 |
| | |||||
* | replacing ordered hash to ruby hash | prasath | 2012-02-08 | 1 | -1/+1 |
| | |||||
* | Fix ActiveModel::Errors#dup | Paweł Kondzior | 2012-01-16 | 1 | -0/+8 |
| | | | | | | | | | Since ActiveModel::Errors instance keeps all error messages as hash we should duplicate this object as well. Previously ActiveModel::Errors was a subclass of ActiveSupport::OrderedHash, which results in different behavior on `dup`, this may result in regression for people relying on it. | ||||
* | Add ActiveModel::Errors#delete, which was not available after move to use ↵ | Piotr Sarnacki | 2012-01-16 | 1 | -0/+7 |
| | | | | delegation | ||||
* | New #added? method on ActiveModel::Errors | Martin Svalin | 2011-10-19 | 1 | -0/+43 |
| | | | The #added? method makes it possible to check if a specific error has been added, using the same parameters as for #add. | ||||
* | ActiveModel::Errors#generate_message without i18n_scope, and more test cases ↵ | Martin Svalin | 2011-10-17 | 1 | -0/+21 |
| | | | | for #add | ||||
* | Added test for obj.errors.as_json | Lawrence Pit | 2011-09-09 | 1 | -0/+11 |
| | |||||
* | Add ability to get an individual full error message + test for full_messages. | Lawrence Pit | 2011-09-09 | 1 | -2/+18 |
| | |||||
* | add has_key? to ActiveModel::Errors | Damien Mathieu | 2011-09-06 | 1 | -0/+6 |
| | |||||
* | Handle the empty array correctly. | thedarkone | 2011-07-27 | 1 | -0/+1 |
| | |||||
* | implementing include? on AM::Errors | Aaron Patterson | 2011-02-09 | 1 | -0/+6 |
| | |||||
* | fix difference between behaviour of blank and empty | Hemant Kumar | 2011-01-05 | 1 | -0/+6 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | ActiveModel::Errors.to_hash returns plain OrderedHash and used in to_json ↵ | Thilo Utke | 2010-12-01 | 1 | -0/+5 |
| | | | | | | serialization to properly handle multiple errors per attribute [#5615 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Revert "Fix generation of wrong json string when field has multiple errors" | José Valim | 2010-12-01 | 1 | -10/+0 |
| | | | | This reverts commit a9b666b51d28b2e74da630c31327dee7cbe96d37. | ||||
* | Fix generation of wrong json string when field has multiple errors | Krekoten' Marjan | 2010-12-01 | 1 | -0/+10 |
| | |||||
* | adding test cases for ActiveModel::Errors | Neeraj Singh | 2010-08-03 | 1 | -0/+65 |
Signed-off-by: José Valim <jose.valim@gmail.com> |