Best way to view all attributes of object?

Hello everyone!

What would be the best way to view all attributes of an object? For
example, if a book has the attributes Title and Author, but also
belongs_to a Buyer (that have name and email), how could I easily view
the books title and author and the buyer's name and email?

If I use book.attributes I can only see it's own attributes, but not the
buyer's attributes.

Thanks in advance!

Hi!

I don’t know if this will be exactly what are you looking for, but I heard about this gem:

https://github.com/ctran/annotate_models

Best Regards,

Everaldo