cleanup, replace non-breaking spaces with spaces

This commit is contained in:
Yves Senn 2012-10-18 07:43:58 +02:00
parent fc32ff4ee3
commit f00b33e173
1 changed files with 5 additions and 5 deletions

View File

@ -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)