Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | uniqueness validation raises error for persisted record without pk. | Yves Senn | 2015-08-20 | 1 | -0/+23 |
| | | | | | | | | Closes #21304. While we can validate uniqueness for record without primary key on creation, there is no way to exclude the current record when updating. (The update itself will need a primary key to work correctly). | ||||
* | Properly allow uniqueness validations on primary keys. | Sean Griffin | 2015-07-25 | 1 | -0/+19 |
| | | | | | | This is an alternate implementation of #20966. [Sean Griffin & presskey] | ||||
* | 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 |
|/ | |||||
* | Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵ | Vipul A M | 2015-02-03 | 1 | -1/+0 |
| | | | | onwards. | ||||
* | Fix validations on child record when record parent has validate: false | eileencodes | 2015-02-01 | 1 | -0/+17 |
| | | | | | | | | | | | | | | 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` | ||||
* | 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 |
| | |||||
* | 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. | ||||
* | 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 |
| | |||||
* | 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. | ||||
* | 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. | ||||
* | 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 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 |
| | |||||
* | 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 |
| | |||||
* | 'with_kcode' removed. | Arun Agrawal | 2011-12-21 | 1 | -17/+13 |
| | | | | Testing Sandbox removed. | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -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. | ||||
* | Do not use SQL LIKE operator for case insensitive uniqueness validation | Raimonds Simanovskis | 2011-04-25 | 1 | -0/+26 |
| | | | It can result in wrong results if values contain special % or _ characters. It is safer to use SQL LOWER function and compare for equality. | ||||
* | DRY up the code which instantiates the association proxy | Jon Leighton | 2011-01-11 | 1 | -13/+0 |
| | |||||
* | removing many unused variables | Aaron Patterson | 2010-11-16 | 1 | -2/+2 |
| | |||||
* | Ensure new validates works with uniqueness validator. | José Valim | 2010-01-08 | 1 | -30/+35 |
| | |||||
* | Simplify repair_validations on AR and make it work with new callbacks. | José Valim | 2010-01-01 | 1 | -11/+0 |
| | |||||
* | Don't publicize with_scope for tests since it may shadow public misuse | Jeremy Kemper | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | Fixed typo in test name and CHANGELOG [#3017 state:resolved] | Arthur Zapparoli | 2009-08-10 | 1 | -1/+1 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | validate uniqueness with limit in utf8 | Elise Huard | 2009-08-09 | 1 | -0/+10 |
| | | | | | | [#2653 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix standalone test missing developer fixture | Jeremy Kemper | 2009-08-09 | 1 | -1/+2 |
| | |||||
* | Added a uniqueness validation test that uses diacritics. | Hugo Peixoto | 2009-08-09 | 1 | -2/+2 |
| | | | | | | [#2883 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Move relevant validation tests from Active Record to Active Model | Pratik Naik | 2009-03-20 | 1 | -0/+278 |