awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.08k stars 454 forks source link

Don’t list an ActiveRecord object’s associations #129

Closed pistachiomatt closed 11 years ago

pistachiomatt commented 11 years ago

When running a query like Post.where( blah ), awesome_print will list all the objects returned (in this example, posts) and also associations on each object (post comments).

This makes it hard to read. Can I request an option to turn this off?

(Ps. I just found awesome_print it is really amazing. Doing customer support is at least 85% easier.)

michaeldv commented 11 years ago

Check if :raw => true option is set in ~/.aprc or ~/.irbrc . In the latest v1.1.0 :raw => false by default.

pistachiomatt commented 11 years ago

But :raw outputs these messy hidden attributes:

#<Shot:0x049f4440
    @aggregation_cache = {},
    @attributes_cache = {},
    @destroyed = false,
    … 
    attr_accessor :attributes = {
                       "id" => "53344”,
                       … actual data
    }
michaeldv commented 11 years ago

Well, that's how it works...