From c33e893775e1c775412553275d4c3cd16ca03d96 Mon Sep 17 00:00:00 2001 From: Abhishek Nalwaya Date: Sun, 18 Nov 2012 12:34:36 +0530 Subject: [PATCH] displaying error message(p tag was missing) and adding output as comment --- activemodel/examples/validations.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activemodel/examples/validations.rb b/activemodel/examples/validations.rb index 0b2706076f8..a56ec4db399 100644 --- a/activemodel/examples/validations.rb +++ b/activemodel/examples/validations.rb @@ -22,8 +22,8 @@ class Person end person1 = Person.new -p person1.valid? -person1.errors +p person1.valid? # => false +p person1.errors.messages # => {:name=>["can't be blank"]} person2 = Person.new(:name => "matz") -p person2.valid? +p person2.valid? # => true