Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 8, 2015 13:06
Show Gist options
  • Save anonymous/ed8dc71d9a9f3c175edd to your computer and use it in GitHub Desktop.
Save anonymous/ed8dc71d9a9f3c175edd to your computer and use it in GitHub Desktop.
product = Product.new
==== partial output from printing product.errors ====
@messages={:price=>["must be greater than or equal to 0.1"]}
==== and we can access it as such ====
product.errors[:price]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment