aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2012-10-18 07:43:58 +0200
committerYves Senn <yves.senn@gmail.com>2012-10-18 07:44:41 +0200
commitf00b33e17334c92485f83313a82399d6e30aafe1 (patch)
tree6301004046e8db8ae5e63348155d8056677fda4f /activemodel/lib/active_model
parentfc32ff4ee322d46c6658a6a2d484fd5f60c07178 (diff)
downloadrails-f00b33e17334c92485f83313a82399d6e30aafe1.tar.gz
rails-f00b33e17334c92485f83313a82399d6e30aafe1.tar.bz2
rails-f00b33e17334c92485f83313a82399d6e30aafe1.zip
cleanup, replace non-breaking spaces with spaces
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/validations.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index 243d911f71..a3b87daadb 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -233,7 +233,7 @@ module ActiveModel
#
# person = Person.new
# person.valid? # => false
- # person.errors # => #<ActiveModel::Errors:0x007fe603816640 @messages={:name=>["can't be blank"]}>
+ # person.errors # => #<ActiveModel::Errors:0x007fe603816640 @messages={:name=>["can't be blank"]}>
def errors
@errors ||= Errors.new(self)
end
@@ -250,7 +250,7 @@ module ActiveModel
#
# person = Person.new
# person.name = ''
- # person.valid? # => false
+ # person.valid? # => false
# person.name = 'david'
# person.valid? # => true
#
@@ -265,7 +265,7 @@ module ActiveModel
# end
#
# person = Person.new
- # person.valid? # => true
+ # person.valid? # => true
# person.valid?(:new) # => false
def valid?(context = nil)
current_context, self.validation_context = validation_context, context
@@ -287,7 +287,7 @@ module ActiveModel
#
# person = Person.new
# person.name = ''
- # person.invalid? # => true
+ # person.invalid? # => true
# person.name = 'david'
# person.invalid? # => false
#
@@ -302,7 +302,7 @@ module ActiveModel
# end
#
# person = Person.new
- # person.invalid? # => false
+ # person.invalid? # => false
# person.invalid?(:new) # => true
def invalid?(context = nil)
!valid?(context)