diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-03-27 14:04:06 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-03-27 14:04:06 +0000 |
commit | 2a305949d756c054cee349c1ef3b39c6cf1496f8 (patch) | |
tree | 6de4aa3106b92e128a6b62dae9938b73a1f7ed03 /actionpack/lib/action_view/helpers/debug_helper.rb | |
parent | 4b78a2a245cb69e958e3d62d4c0e6fcab2eb3e76 (diff) | |
download | rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.tar.gz rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.tar.bz2 rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.zip |
documentation project patches, closes #7342, #7319, #7316, #7190 [jeremymcanally]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/debug_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/debug_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/debug_helper.rb b/actionpack/lib/action_view/helpers/debug_helper.rb index 9e92813a18..ef089c1bad 100644 --- a/actionpack/lib/action_view/helpers/debug_helper.rb +++ b/actionpack/lib/action_view/helpers/debug_helper.rb @@ -3,6 +3,16 @@ module ActionView # Provides a set of methods for making it easier to locate problems. module DebugHelper # Returns a <pre>-tag set with the +object+ dumped by YAML. Very readable way to inspect an object. + # my_hash = {'first' => 1, 'second' => 'two', 'third' => [1,2,3]} + # debug(my_hash) + # => <pre class='debug_dump'>--- + # first: 1 + # second: two + # third: + # - 1 + # - 2 + # - 3 + # </pre> def debug(object) begin Marshal::dump(object) |