method
debug
v6.1.7.7 -
Show latest stable
-
0 notes -
Class: ActionView::Helpers::DebugHelper
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (25)
- 2.0.3 (4)
- 2.1.0 (0)
- 2.2.1 (38)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (-5)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (-3)
- 4.1.8 (0)
- 4.2.1 (-10)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (0)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- 7.2.3 (0)
- 8.0.0 (0)
- 8.1.1 (0)
- What's this?
debug(object)
public
Returns a YAML representation of object wrapped with <pre> and </pre>. If the object cannot be converted to YAML using to_yaml, inspect will be called instead. Useful for inspecting an object at the time of rendering.
@user = User.new({ username: 'testing', password: 'xyz', age: 42}) debug(@user) # => <pre class='debug_dump'>--- !ruby/object:User attributes: updated_at: username: testing age: 42 password: xyz created_at: </pre>

