Created
November 10, 2008 21:54
-
-
Save jackdempsey/23651 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >> gist.errors | |
| => #<DataMapper::Validate::ValidationErrors:0x52ad104 @errors={:name=>["Name must not be blank"], :url=>["Url must not be blank"]} | |
| >> gist.errors.keys | |
| => [:name, :url] | |
| >> gist.errors[:name] | |
| => ["Name must not be blank"] | |
| model: | |
| validates_present :url | |
| validates_present :name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment