Search code examples
ruby-on-railsdebuggingawesomeprint

Debug with Rails


Up: If it's true:

"You wan to display a very complex object, you have a very complex result."

How I could make easier the output?


I wanna pretty print @_controller and what I see:

  1. <%= debug @_controller %> enter image description here

2.<%= simple_format @_controller.to_yaml %> error: "can't dump anonymous module: #"

  1. <%= @_controller.inspect %>

enter image description here

  1. <%= raw ap(@_controller) %> enter image description here

Is there are way to pretty print this object (@_controller)?

Like echo '<pre>';print_r($object);echo '</pre>'; in php?

Thx a lot!!!


Solution

  • I found an answer by myself, its ok for me to print controller.methods and controller.instance_variables

    Thx a lot!