Browse files

p.errors.full_messages is a little more human readable

  • Loading branch information...
1 parent fc8f0a8 commit cb552f807e5bb2650791d17b01b6ac67c6023937 @jasonnoble jasonnoble committed Nov 13, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 railties/guides/source/getting_started.textile
View
6 railties/guides/source/getting_started.textile
@@ -731,10 +731,8 @@ After the console loads, you can use it to work with your application's models:
updated_at: nil>
>> p.save
=> false
->> p.errors
-=> #<OrderedHash { :title=>["can't be blank",
- "is too short (minimum is 5 characters)"],
- :name=>["can't be blank"] }>
+>> p.errors.full_messages
+=> ["Name can't be blank", "Title can't be blank", "Title is too short (minimum is 5 characters)"]
</shell>
This code shows creating a new +Post+ instance, attempting to save it and

0 comments on commit cb552f8

Please sign in to comment.