Printing save error


I am new to Ruby and am facing issue while debugging a bug in my rails

When I am trying to save an object, an error is encountered. I am not
sure how to view the errors. Any help is appreciated.

Here's the snippet:

    newuser = = email_new
    newuser.login = login
    newuser.password = login

    puts "Saving new user"
      puts "Done Saving new user"
      puts "User Not saved"
      # How to print the errors??


Got it.

Seems like there's an error property on all objects. Putting the
following prints the errors -

      puts newuser.errors.to_yaml