I am trying to debug the user object created by writing ruby code like
puts user
which then I can check it on the server log.
Apparently, the server log says something like
#<User:0x3b53440>
but it does not show details about the user object. (for example, its name or email values)
How should I modify the code so that the detail information about object will be produced?
I want some function in ruby that does similar job as PHP’s print_r or var_dump.
Try using the
Object.inspectmethod:Here’s the documentation: http://www.ruby-doc.org/core/classes/Object.html#M001025