From c782641002b7df1ecd693a6c5c439f3a4c036351 Mon Sep 17 00:00:00 2001 From: Aditya Kapoor Date: Sat, 14 Jun 2014 15:22:09 +0530 Subject: remove unnecessary substitution for space in ActionView::Helpers#debug --- actionview/lib/action_view/helpers/debug_helper.rb | 12 ++++++------ actionview/test/template/debug_helper_test.rb | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/actionview/lib/action_view/helpers/debug_helper.rb b/actionview/lib/action_view/helpers/debug_helper.rb index 16cddec339..ba47eee9ba 100644 --- a/actionview/lib/action_view/helpers/debug_helper.rb +++ b/actionview/lib/action_view/helpers/debug_helper.rb @@ -16,15 +16,15 @@ module ActionView # # => #
--- !ruby/object:User
       #   attributes:
-      #     updated_at:
-      #     username: testing
-      #     age: 42
-      #     password: xyz
-      #     created_at:
+      #     updated_at:
+      #     username: testing
+      #     age: 42
+      #     password: xyz
+      #     created_at:
       #   
def debug(object) Marshal::dump(object) - object = ERB::Util.html_escape(object.to_yaml).gsub(" ", "  ").html_safe + object = ERB::Util.html_escape(object.to_yaml) content_tag(:pre, object, :class => "debug_dump") rescue Exception # errors from Marshal or YAML # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback diff --git a/actionview/test/template/debug_helper_test.rb b/actionview/test/template/debug_helper_test.rb index 42d06bd9ff..5609694cd5 100644 --- a/actionview/test/template/debug_helper_test.rb +++ b/actionview/test/template/debug_helper_test.rb @@ -3,6 +3,6 @@ require 'active_record_unit' class DebugHelperTest < ActionView::TestCase def test_debug company = Company.new(name: "firebase") - assert_match "  name: firebase", debug(company) + assert_match "name: firebase", debug(company) end end -- cgit v1.2.3