From 3004bc24706ed62ea7e4e752adc287dc92d168f5 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Wed, 16 May 2012 10:01:43 -0500 Subject: fixing removed empty lines and examples --- activemodel/lib/active_model/validations/acceptance.rb | 1 + activemodel/lib/active_model/validations/confirmation.rb | 1 + activemodel/lib/active_model/validations/exclusion.rb | 10 ++++------ activemodel/lib/active_model/validations/format.rb | 1 + activemodel/lib/active_model/validations/inclusion.rb | 1 + activemodel/lib/active_model/validations/length.rb | 1 + activemodel/lib/active_model/validations/numericality.rb | 1 + activemodel/lib/active_model/validations/presence.rb | 1 + 8 files changed, 11 insertions(+), 6 deletions(-) diff --git a/activemodel/lib/active_model/validations/acceptance.rb b/activemodel/lib/active_model/validations/acceptance.rb index 7ce7700079..38abd0c1fa 100644 --- a/activemodel/lib/active_model/validations/acceptance.rb +++ b/activemodel/lib/active_model/validations/acceptance.rb @@ -1,4 +1,5 @@ module ActiveModel + # == Active Model Acceptance Validator module Validations class AcceptanceValidator < EachValidator diff --git a/activemodel/lib/active_model/validations/confirmation.rb b/activemodel/lib/active_model/validations/confirmation.rb index c591dba609..ede34d15bc 100644 --- a/activemodel/lib/active_model/validations/confirmation.rb +++ b/activemodel/lib/active_model/validations/confirmation.rb @@ -1,4 +1,5 @@ module ActiveModel + # == Active Model Confirmation Validator module Validations class ConfirmationValidator < EachValidator diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb index 4a6a45ecf3..4f09679541 100644 --- a/activemodel/lib/active_model/validations/exclusion.rb +++ b/activemodel/lib/active_model/validations/exclusion.rb @@ -1,6 +1,7 @@ require "active_model/validations/clusivity" module ActiveModel + # == Active Model Exclusion Validator module Validations class ExclusionValidator < EachValidator @@ -18,12 +19,9 @@ module ActiveModel # particular enumerable object. # # class Person < ActiveRecord::Base - # validates_exclusion_of :username, :in => %w( admin superuser ), - # :message => "You don't belong here" - # validates_exclusion_of :age, :in => 30..60, - # :message => "This site is only for under 30 and over 60" - # validates_exclusion_of :format, :in => %w( mov avi ), - # :message => "extension %{value} is not allowed" + # validates_exclusion_of :username, :in => %w( admin superuser ), :message => "You don't belong here" + # validates_exclusion_of :age, :in => 30..60, :message => "This site is only for under 30 and over 60" + # validates_exclusion_of :format, :in => %w( mov avi ), :message => "extension %{value} is not allowed" # validates_exclusion_of :password, :in => lambda { |p| [p.username, p.first_name] }, # :message => "should not be the same as your username or first name" # end diff --git a/activemodel/lib/active_model/validations/format.rb b/activemodel/lib/active_model/validations/format.rb index dae6a01829..dd87e312f9 100644 --- a/activemodel/lib/active_model/validations/format.rb +++ b/activemodel/lib/active_model/validations/format.rb @@ -1,4 +1,5 @@ module ActiveModel + # == Active Model Format Validator module Validations class FormatValidator < EachValidator diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index be1e6160f1..ffdbed0fc1 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -1,6 +1,7 @@ require "active_model/validations/clusivity" module ActiveModel + # == Active Model Inclusion Validator module Validations class InclusionValidator < EachValidator diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb index 4a9a6ea7a5..64b4fe2d74 100644 --- a/activemodel/lib/active_model/validations/length.rb +++ b/activemodel/lib/active_model/validations/length.rb @@ -1,4 +1,5 @@ module ActiveModel + # == Active Model Length Validator module Validations class LengthValidator < EachValidator diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index 78c25f70f2..40b5b92b84 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -1,4 +1,5 @@ module ActiveModel + # == Active Model Numericality Validator module Validations class NumericalityValidator < EachValidator diff --git a/activemodel/lib/active_model/validations/presence.rb b/activemodel/lib/active_model/validations/presence.rb index e606f74757..018ef1e733 100644 --- a/activemodel/lib/active_model/validations/presence.rb +++ b/activemodel/lib/active_model/validations/presence.rb @@ -1,6 +1,7 @@ require 'active_support/core_ext/object/blank' module ActiveModel + # == Active Model Presence Validator module Validations class PresenceValidator < EachValidator -- cgit v1.2.3