提交 ae12f798 编写于 作者: R Richard Schneeman

Merge pull request #15449 from aditya-kapoor/correct-debug-doc

[ci skip] correct doc for ActionView::Helpers::DebugHelper
......@@ -11,20 +11,16 @@ module DebugHelper
# 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}) %>
# @user = User.new({ username: 'testing', password: 'xyz', age: 42})
# debug(@user)
# # =>
# <pre class='debug_dump'>--- !ruby/object:User
# attributes:
# &nbsp; updated_at:
# &nbsp; username: testing
#
# &nbsp; age: 42
# &nbsp; password: xyz
# &nbsp; created_at:
# attributes_cache: {}
#
# new_record: true
# </pre>
def debug(object)
Marshal::dump(object)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册