aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-07-30 02:35:24 +0200
committerXavier Noria <fxn@hashref.com>2010-07-30 02:35:24 +0200
commitccd45618ed9a629c9535a5ff84ef5c238befa4ab (patch)
tree0a582bf695dce01240762d2b8516efde43bc3515 /activemodel/lib/active_model/validations.rb
parent3c3ff1377d17b584dd14d85c7cecab59ddff2679 (diff)
parent755af497555fde16db86f7e51f6462b0aca79b49 (diff)
downloadrails-ccd45618ed9a629c9535a5ff84ef5c238befa4ab.tar.gz
rails-ccd45618ed9a629c9535a5ff84ef5c238befa4ab.tar.bz2
rails-ccd45618ed9a629c9535a5ff84ef5c238befa4ab.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'activemodel/lib/active_model/validations.rb')
-rw-r--r--activemodel/lib/active_model/validations.rb18
1 files changed, 7 insertions, 11 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index 5779ba3b29..1a58d4c4fb 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -24,20 +24,16 @@ module ActiveModel
# end
#
# Which provides you with the full standard validation stack that you
- # know from ActiveRecord.
+ # know from Active Record:
#
# person = Person.new
- # person.valid?
- # #=> true
- # person.invalid?
- # #=> false
+ # person.valid? # => true
+ # person.invalid? # => false
+ #
# person.first_name = 'zoolander'
- # person.valid?
- # #=> false
- # person.invalid?
- # #=> true
- # person.errors
- # #=> #<OrderedHash {:first_name=>["starts with z."]}>
+ # person.valid? # => false
+ # person.invalid? # => true
+ # person.errors # => #<OrderedHash {:first_name=>["starts with z."]}>
#
# Note that ActiveModel::Validations automatically adds an +errors+ method
# to your instances initialized with a new ActiveModel::Errors object, so