Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge branch 'fix_uniqueness_validation_when_value_is_out_of_range' | Sean Griffin | 2015-04-08 | 1 | -0/+25 |
|\ | |||||
| * | Fix uniqueness validation with out of range value | Andrey Voronkov | 2015-04-08 | 1 | -0/+25 |
|/ | |||||
* | replace `repair_validations` with a disposable subclass. | Yves Senn | 2015-03-06 | 1 | -32/+33 |
| | |||||
* | Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵ | Vipul A M | 2015-02-03 | 3 | -3/+0 |
| | | | | onwards. | ||||
* | Fix validations on child record when record parent has validate: false | eileencodes | 2015-02-01 | 4 | -5/+50 |
| | | | | | | | | | | | | | | Fixes #17621. This 5 year old (or older) issue causes validations to fire when a parent record has `validate: false` option and a child record is saved. It's not the responsibility of the model to validate an associated object unless the object was created or modified by the parent. Clean up tests related to validations `assert_nothing_raised` is not benefiting us in these tests Corrected spelling of "respects" It's better to use `assert_not_operator` over `assert !r.valid` | ||||
* | AR specific length validator to respect `marked_for_destruction`. | Yves Senn | 2014-12-30 | 1 | -0/+18 |
| | | | | | | | | Closes #7247. Conflicts: activerecord/CHANGELOG.md activerecord/test/models/owner.rb | ||||
* | pg tests, move uniqueness validation test to array tests. | Yves Senn | 2014-12-02 | 1 | -17/+0 |
| | |||||
* | Fixes a bug found when running individual tests against #17217 after merging | Sammy Larbi | 2014-11-10 | 1 | -1/+1 |
| | |||||
* | Clear validators before and after each test | Akira Matsuda | 2014-08-14 | 1 | -0/+1 |
| | | | | Or some tests fail when run in random order | ||||
* | Remove the side-effects of validates_presence_of. | Zuhao Wan | 2014-07-22 | 1 | -2/+3 |
| | |||||
* | move AR length validation tests into separate test-case. | Yves Senn | 2014-04-24 | 2 | -42/+48 |
| | | | | | Conflicts: activerecord/test/cases/validations/association_validation_test.rb | ||||
* | Use teardown helper method. | Guo Xiang Tan | 2014-03-14 | 1 | -1/+1 |
| | | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order. | ||||
* | passing an instance of an AR object to `find` is deprecated | Aaron Patterson | 2014-03-13 | 1 | -1/+1 |
| | | | | please pass the id of the AR object by calling `.id` on the model first. | ||||
* | use the new clear_validators! api everywhere to reset validators in tests | Kuldeep Aggarwal | 2014-01-28 | 1 | -1/+1 |
| | |||||
* | Add CHANGELOG entry for #13557 [ci skip] | Rafael Mendonça França | 2014-01-01 | 1 | -1/+0 |
| | |||||
* | add test case | gmarik | 2013-12-31 | 1 | -0/+17 |
| | |||||
* | Merge pull request #13061 from ↵ | Rafael Mendonça França | 2013-11-26 | 1 | -0/+8 |
| | | | | | | | | laurocaetano/fix-uniqueness-validation-for-aliased-attribute Fix bug when validating the uniqueness of an aliased attribute. Conflicts: activerecord/CHANGELOG.md | ||||
* | Fix validation on uniqueness of empty association | Evgeny Li | 2013-11-22 | 1 | -0/+19 |
| | |||||
* | Fix bad test order dependency between ↵ | Ryan Davis | 2013-11-16 | 1 | -8/+16 |
| | | | | test/cases/validations/i18n_generate_message_validation_test.rb and test/cases/validations/uniqueness_validation_test.rb | ||||
* | Don't skip tests if we don't need to. | Rafael Mendonça França | 2013-11-08 | 1 | -10/+10 |
| | | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed. | ||||
* | Properly repair validations when dynamically added | Akira Matsuda | 2013-07-29 | 1 | -24/+30 |
| | |||||
* | Revert "Merge pull request #4490 from EmmanuelOga/master" | José Valim | 2013-06-04 | 1 | -17/+0 |
| | | | | | | | | This behaviour doesn't actually make sense, the context of the child should not be affected by the parent. See #10492. This reverts commit 5f8274efe128ffeec8fa3179460f5167a078f007, reversing changes made to 81e837e810460d066a2e5fc5a795366ec8ab2313. | ||||
* | Fix wrong `case_sensitive` in uniqueness validity test | Vipul A M | 2013-05-20 | 1 | -1/+1 |
| | |||||
* | Fixed typos in activerecord | Prathamesh Sonpatki | 2013-03-27 | 1 | -1/+1 |
| | |||||
* | Change uniq validation with conditions examples to use where with hashes | Carlos Antonio da Silva | 2013-03-09 | 1 | -2/+2 |
| | | | | Take the opportunity to showcase where.not. | ||||
* | Uniqueness validation uses a proc to specify the `:conditions` option. | Yves Senn | 2013-03-09 | 1 | -1/+7 |
| | | | | | This is a follow up to #5321 and follows the general direction in AR to make things lazy evaluated. | ||||
* | Added support for validates_uniqueness_of in PostgreSQL array columns. ↵ | Pedro Padron | 2012-12-18 | 1 | -3/+20 |
| | | | | Fixes: #8075. | ||||
* | Add tests to make sure that the I18n taken message can be overrided in the | Rafael Mendonça França | 2012-10-22 | 1 | -0/+14 |
| | | | | | | activerecord scope. Related with 5341b84936d93ec90e6252af437a3871101c115a | ||||
* | Changed scope for "taken" error message translation to decrease precedence | Andrew DiMichele | 2012-10-19 | 1 | -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 | ||||
* | Fix bug with presence validation of associations. | Scott Willson | 2012-10-16 | 1 | -0/+7 |
| | | | | Would incorrectly add duplicated errors when the association was blank. Bug introduced in 1fab518c6a75dac5773654646eb724a59741bc13. | ||||
* | Cleanup trailing whitespaces | dfens | 2012-10-12 | 1 | -1/+1 |
| | |||||
* | gradually moving documentation to new hash syntax | AvnerCohen | 2012-10-10 | 1 | -1/+1 |
| | |||||
* | Merge pull request #6827 from zephyr-dev/master | José Valim | 2012-07-27 | 1 | -0/+44 |
|\ | | | | | Validates_presence_of associated object marked for destruction | ||||
| * | AR has a subclass of AM:PresenceValidator. | Brent Wheeldon & Nick Monje | 2012-07-20 | 1 | -0/+44 |
| | | | | | | | | | | | | | | This allows us to mark the parent object as invalid if all associated objects in a presence validated association are marked for destruction. See: https://github.com/rails/rails/issues/6812 | ||||
* | | Deprecate ActiveRecord::Base.scoped. | Jon Leighton | 2012-07-27 | 1 | -1/+1 |
| | | | | | | | | | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders. | ||||
* | | Fixes "Cannot visit ..." with validates_uniqueness_of | beerlington | 2012-07-17 | 1 | -0/+16 |
|/ | | | | | | Fixes issue with overrding ActiveRecord reader methods with a composed object and using that attribute as the scope of a validates_uniqueness_of validation. | ||||
* | remove deprecated calls | Jon Leighton | 2012-04-27 | 1 | -1/+1 |
| | |||||
* | remove calls to find(:first), find(:last) and find(:all) | Jon Leighton | 2012-04-26 | 1 | -1/+1 |
| | |||||
* | remove tests for #with_scope (it's now deprecated) | Jon Leighton | 2012-04-25 | 1 | -2/+2 |
| | |||||
* | removed unused variables | Arun Agrawal | 2012-03-27 | 1 | -2/+2 |
| | |||||
* | Change syntax to accept an AR::Relation instead of old conditions hash/array. | Mattias Pfeiffer | 2012-03-07 | 1 | -1/+1 |
| | |||||
* | Add :conditions option to uniqueness validator | Mattias Pfeiffer | 2012-03-07 | 1 | -0/+12 |
| | |||||
* | Tweak ↵ | Christopher Dell | 2012-03-05 | 1 | -1/+2 |
| | | | | activerecord/test/cases/validations/i18n_generate_message_validation_test.rb | ||||
* | Test that RecordInvalid exception's translation falls back to the :errors ↵ | Christopher Dell | 2012-03-05 | 1 | -0/+18 |
| | | | | namespace | ||||
* | validate related records in the same validation context as parent. | Emmanuel Oga | 2012-01-17 | 1 | -0/+17 |
| | | | | | | | | | | | | | | | | | | | | E.G.: ```ruby class Parent < ActiveRecord::Base has_one :child validates_presence_of :name, :on => "custom_context" validates_associated :child end class Child < ActiveRecord::Base belongs_to :parent validates_presence_of :name, :on => "custom_context" end p = Parent.new(:name => "Montoto", :child => Child.new) p.valid?(:custom_context) # => Returns true, even though the child is not valid under the same context. ``` | ||||
* | allow association as 1st uniqueness validation arg | Dan Pickett | 2012-01-06 | 1 | -0/+12 |
| | | | #4321 | ||||
* | allow an association as a scope parameter | Dan Pickett | 2012-01-06 | 1 | -0/+12 |
| | | | #4321 | ||||
* | Fixed nil field value uniqueness check | pyromaniac | 2012-01-06 | 1 | -0/+12 |
| | |||||
* | Revert "Merge pull request #2325 from pyromaniac/master" | José Valim | 2012-01-06 | 1 | -12/+0 |
| | | | | | | | It breaks the build for mysql. This reverts commit 958d25df4a1b0d41ce5deeeb0739c93b49bbd18d, reversing changes made to 8f309e31057e1b26fefedb199ab0526126fb1fe4. | ||||
* | Fixed nil field value uniqueness check | pyromaniac | 2012-01-06 | 1 | -0/+12 |
| |