Sha256: 7ea8502e449bd4592e2e30fefd29beb253b236acacc62fea88f703e0e91f8931

Contents?: true

Size: 658 Bytes

Versions: 8

Compression:

Stored size: 658 Bytes

Contents

module ActionView
  module Helpers
    # 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.
      def debug(object)
        begin
          Marshal::dump(object)
          "<pre class='debug_dump'>#{h(object.to_yaml).gsub("  ", "&nbsp; ")}</pre>"
        rescue Exception => e  # errors from Marshal or YAML
          # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
          "<code class='debug_dump'>#{h(object.inspect)}</code>"
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jstorimer-deep-test-2.0.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
jstorimer-deep-test-1.4.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
jstorimer-deep-test-1.3.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
jstorimer-deep-test-1.2.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
jstorimer-deep-test-1.1.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
jstorimer-deep-test-1.0.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
jstorimer-deep-test-0.2.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
jstorimer-deep-test-0.1.0 sample_rails_project/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb