aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/validations/uniqueness.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an ↵José Valim2010-05-151-1/+1
| | | | | | | | options hash and make various Validators pass their (filtered) options." Having a huge array to whitelist options is not the proper way to handle this case. This means that the ActiveModel::Errors object should know about the options given in *all* validators and break the extensibility added by the validators itself. If the intent is to whitelist options before sending them to I18n, each validator should clean its respective options instead of throwing the responsibility to the Errors object. This reverts commit bc1c8d58ec45593acba614d1d0fecb49adef08ff.
* Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | 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). Original patch by Sven Fuchs, some minor changes and has been changed to be applicable to master again [#4057 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Avoid deprecated String#to_a by using Array.wrap(...) instead of Array(...)Jeremy Kemper2010-04-101-1/+3
|
* use the database to lower case strings rather than ruby. [#4293 state:resolved]Aaron Patterson2010-03-281-4/+2
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Rename Model.active_relation to Model.unscopedPratik Naik2010-01-171-1/+1
|
* Ensure new validates works with uniqueness validator.José Valim2010-01-081-3/+6
|
* Use relations to build uniqueness conditionsPratik Naik2010-01-021-8/+9
|
* Fix uniqueness validation: with_exclusive_scope is not publicJeremy Kemper2009-12-281-1/+1
|
* ActiveRecord::Validations are now built on top of Validator as well.José Valim2009-12-231-58/+76
|
* validate uniqueness with limit in utf8Elise Huard2009-08-091-1/+1
| | | | | | [#2653 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Move uniqueness and association validations to Active RecordPratik Naik2009-03-191-0/+159