diff --git a/lib/ap.rb b/lib/ap.rb index d53e37e..6572d1b 100755 --- a/lib/ap.rb +++ b/lib/ap.rb @@ -11,4 +11,5 @@ require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(::Logger) or require File.dirname(__FILE__) + "/ap/mixin/active_record" if defined?(::ActiveRecord) require File.dirname(__FILE__) + "/ap/mixin/active_support" if defined?(::ActiveSupport) +require File.dirname(__FILE__) + "/ap/mixin/application_helper" if defined?(::ApplicationHelper) diff --git a/lib/ap/mixin/application_helper.rb b/lib/ap/mixin/application_helper.rb new file mode 100644 index 0000000..c174fe3 --- /dev/null +++ b/lib/ap/mixin/application_helper.rb @@ -0,0 +1,5 @@ +module ApplicationHelper + def ap_debug(obj) + content_tag(:pre, obj.ai(:plain => true), :class => 'debug_dump') + end +end