aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-08-18 00:25:32 +0200
committerXavier Noria <fxn@hashref.com>2010-08-18 00:25:32 +0200
commita0ca3d1067a4e6fdee3baaff35a4547b3a1aa991 (patch)
tree388596787f5f77ac8fad94c6fa4d845c5cc17400 /activemodel
parentdd55830bb279a4ef492727d6ffda169eb569ba27 (diff)
parent23f6e51b69e9c4e4b5a43183b2fa28be45358a9e (diff)
downloadrails-a0ca3d1067a4e6fdee3baaff35a4547b3a1aa991.tar.gz
rails-a0ca3d1067a4e6fdee3baaff35a4547b3a1aa991.tar.bz2
rails-a0ca3d1067a4e6fdee3baaff35a4547b3a1aa991.zip
Merge remote branch 'docrails/master'
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/validations/validates.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb
index 3242e49269..f6349d57a5 100644
--- a/activemodel/lib/active_model/validations/validates.rb
+++ b/activemodel/lib/active_model/validations/validates.rb
@@ -28,7 +28,7 @@ module ActiveModel
# class EmailValidator < ActiveModel::EachValidator
# def validate_each(record, attribute, value)
# record.errors[attribute] << (options[:message] || "is not an email") unless
- # value =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
+ # value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
# end
# end
#
@@ -48,7 +48,7 @@ module ActiveModel
#
# class TitleValidator < ActiveModel::EachValidator
# def validate_each(record, attribute, value)
- # record.errors[attribute] << "must start with 'the'" unless =~ /^the/i
+ # record.errors[attribute] << "must start with 'the'" unless value =~ /\Athe/i
# end
# end
#