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(" ", " ")}</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