Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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 |
| | |||||
* | 'with_kcode' removed. | Arun Agrawal | 2011-12-21 | 2 | -25/+19 |
| | | | | Testing Sandbox removed. | ||||
* | Do not validate associated records marked for destruction | Olek Janiszewski | 2011-12-05 | 1 | -0/+10 |
| | | | | | | The main reason for this change is to fix a bug where `validates_associated` would prevent `accepts_nested_attributes_for` with `allow_destroy: true` from destroying invalid associated records. | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 4 | -4/+4 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 4 | -4/+4 |
| | | | | 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 | 2 | -4/+4 |
| | |||||
* | removing unused models from tests | Subba Rao Pasupuleti | 2010-07-21 | 1 | -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 Dijk | 2010-06-21 | 2 | -28/+34 |
| | | | | | | | | | | | | | | | | 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 Pit | 2010-05-03 | 1 | -2/+2 |
| | | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | removing dead code from activerecord tests. [#4187 state:resolved] | Aaron Patterson | 2010-03-15 | 1 | -19/+0 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Drop AR I18n deprecation and simple use errors.messages as fallback. | José Valim | 2010-01-30 | 1 | -7/+7 |
| | |||||
* | Ensure new validates works with uniqueness validator. | José Valim | 2010-01-08 | 2 | -85/+78 |
| | |||||
* | 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 | 2 | -82/+25 |
| | | | | I18n yml files. | ||||
* | Simplify repair_validations on AR and make it work with new callbacks. | José Valim | 2010-01-01 | 3 | -15/+5 |
| | |||||
* | Don't publicize with_scope for tests since it may shadow public misuse | Jeremy Kemper | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | Move validator, human_name and human_attribute_name to ActiveModel, remove ↵ | José Valim | 2009-10-20 | 2 | -852/+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é Valim | 2009-09-08 | 2 | -30/+6 |
| | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | allow ActiveRecord#RecordInvalid exception message to be localized | Sven Fuchs | 2009-08-26 | 1 | -0/+188 |
| | | | | | | [#2754 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | 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> |