diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-09-28 23:17:07 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-09-28 23:17:07 +0530 |
commit | 955a72c692a4298d238cc2e6353b9874099203f1 (patch) | |
tree | 2a05fecd15526cd0013c22e45825be1aca4844d9 /activerecord/lib/active_record/validations/uniqueness.rb | |
parent | 77fbe1c0199567486c422fdf5cce49f2c11fc953 (diff) | |
parent | cf3e760b87c49470c9a26ab3e2da67602474be1f (diff) | |
download | rails-955a72c692a4298d238cc2e6353b9874099203f1.tar.gz rails-955a72c692a4298d238cc2e6353b9874099203f1.tar.bz2 rails-955a72c692a4298d238cc2e6353b9874099203f1.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
actionpack/lib/action_view/helpers/asset_tag_helper.rb
Diffstat (limited to 'activerecord/lib/active_record/validations/uniqueness.rb')
-rw-r--r-- | activerecord/lib/active_record/validations/uniqueness.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index c117872ac8..f3620c1324 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -2,7 +2,7 @@ require 'active_support/core_ext/array/prepend_and_append' module ActiveRecord module Validations - class UniquenessValidator < ActiveModel::EachValidator #:nodoc: + class UniquenessValidator < ActiveModel::EachValidator # :nodoc: def initialize(options) super(options.reverse_merge(:case_sensitive => true)) end @@ -199,7 +199,7 @@ module ActiveRecord # can catch it and restart the transaction (e.g. by telling the user # that the title already exists, and asking him to re-enter the title). # This technique is also known as optimistic concurrency control: - # http://en.wikipedia.org/wiki/Optimistic_concurrency_control + # http://en.wikipedia.org/wiki/Optimistic_concurrency_control. # # The bundled ActiveRecord::ConnectionAdapters distinguish unique index # constraint errors from other types of database errors by throwing an @@ -209,10 +209,10 @@ module ActiveRecord # # The following bundled adapters throw the ActiveRecord::RecordNotUnique exception: # - # * ActiveRecord::ConnectionAdapters::MysqlAdapter - # * ActiveRecord::ConnectionAdapters::Mysql2Adapter - # * ActiveRecord::ConnectionAdapters::SQLite3Adapter - # * ActiveRecord::ConnectionAdapters::PostgreSQLAdapter + # * ActiveRecord::ConnectionAdapters::MysqlAdapter. + # * ActiveRecord::ConnectionAdapters::Mysql2Adapter. + # * ActiveRecord::ConnectionAdapters::SQLite3Adapter. + # * ActiveRecord::ConnectionAdapters::PostgreSQLAdapter. def validates_uniqueness_of(*attr_names) validates_with UniquenessValidator, _merge_attributes(attr_names) end |