7

How do I get AwesomePrint.ap to show the associated objects that are nested inside an object? It doesn't do this by default and I'm assuming there's a way to force it?

Charles
  • 50,943
  • 13
  • 104
  • 142
jaydel
  • 14,389
  • 14
  • 62
  • 98

1 Answers1

7

You can use the raw parameter, e.g.

ap my_model, raw: true

This recursively formats instance variables. You can also make it the default using AwesomePrint.defaults (Documentation)

But beware: That feature can add a large amount of noise, especially when printing Rails related object instances. (especially ActiveRecord::Base)

Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
  • sorry for the long response/acceptance. thanks a ton for this. Just what I was looking for. – jaydel Jan 10 '13 at 15:20