From 2a305949d756c054cee349c1ef3b39c6cf1496f8 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Tue, 27 Mar 2007 14:04:06 +0000 Subject: 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 --- actionpack/lib/action_view/helpers/debug_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/lib/action_view/helpers/debug_helper.rb') 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
-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)
+      #  => 
--- 
+      #  first: 1
+      #  second: two
+      #  third: 
+      #  - 1
+      #  - 2
+      #  - 3
+      #  
def debug(object) begin Marshal::dump(object) -- cgit v1.2.3