Class: ActionDispatch::DebugExceptions::DebugView

Inherits:
ActionView::Base show all
Defined in:
actionpack/lib/action_dispatch/middleware/debug_exceptions.rb

Constant Summary

Constants included from ActionView::Helpers::UrlHelper

ActionView::Helpers::UrlHelper::BUTTON_TAG_METHOD_VERBS

Constants included from ActionView::Helpers::TagHelper

ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES, ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS, ActionView::Helpers::TagHelper::TAG_PREFIXES

Constants included from ActionView::Helpers::JavaScriptHelper

ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP

Constants included from ActionView::RecordIdentifier

ActionView::RecordIdentifier::JOIN, ActionView::RecordIdentifier::NEW

Constants included from ActionView::Helpers::DateHelper

ActionView::Helpers::DateHelper::MINUTES_IN_QUARTER_YEAR, ActionView::Helpers::DateHelper::MINUTES_IN_THREE_QUARTERS_YEAR, ActionView::Helpers::DateHelper::MINUTES_IN_YEAR

Constants included from ActionView::Helpers::AssetUrlHelper

ActionView::Helpers::AssetUrlHelper::ASSET_EXTENSIONS, ActionView::Helpers::AssetUrlHelper::ASSET_PUBLIC_DIRECTORIES, ActionView::Helpers::AssetUrlHelper::URI_REGEXP

Constants included from ERB::Util

ERB::Util::HTML_ESCAPE, ERB::Util::HTML_ESCAPE_ONCE_REGEXP, ERB::Util::JSON_ESCAPE, ERB::Util::JSON_ESCAPE_REGEXP

Instance Attribute Summary

Attributes inherited from ActionView::Base

#view_renderer

Attributes included from ActionView::Context

#output_buffer, #view_flow

Instance Method Summary collapse

Methods inherited from ActionView::Base

#assign, cache_template_loading, cache_template_loading=, #initialize, xss_safe?

Methods included from ActionView::Helpers

eager_load!

Methods included from ActiveSupport::Concern

#append_features, #class_methods, extended, #included

Methods included from ActiveSupport::Autoload

#autoload, #autoload_at, #autoload_under, #autoloads, #eager_autoload, #eager_load!, extended

Methods included from ActionView::Helpers::UrlHelper

#button_to, #current_page?, #link_to, #link_to_if, #link_to_unless, #link_to_unless_current, #mail_to, #url_for

Methods included from ActionView::Helpers::TagHelper

#cdata_section, #content_tag, #escape_once, #tag

Methods included from ActionView::Helpers::OutputSafetyHelper

#raw, #safe_join, #to_sentence

Methods included from ActionView::Helpers::CaptureHelper

#capture, #content_for, #content_for?, #provide, #with_output_buffer

Methods included from ActionView::Helpers::TranslationHelper

#localize, #translate

Methods included from ActionView::Helpers::TextHelper

#concat, #current_cycle, #cycle, #excerpt, #highlight, #pluralize, #reset_cycle, #safe_concat, #simple_format, #truncate, #word_wrap

Methods included from ActionView::Helpers::SanitizeHelper

#sanitize, #sanitize_css, #strip_links, #strip_tags

Methods included from ActionView::Helpers::RenderingHelper

#_layout_for, #render

Methods included from ActionView::Helpers::RecordTagHelper

#content_tag_for, #div_for

Methods included from ActionView::Helpers::NumberHelper

#number_to_currency, #number_to_human, #number_to_human_size, #number_to_percentage, #number_to_phone, #number_with_delimiter, #number_with_precision

Methods included from ActionView::Helpers::JavaScriptHelper

#escape_javascript, #javascript_cdata_section, #javascript_tag

Methods included from ActionView::Helpers::FormTagHelper

#button_tag, #check_box_tag, #color_field_tag, #date_field_tag, #datetime_field_tag, #email_field_tag, #field_set_tag, #file_field_tag, #form_tag, #hidden_field_tag, #image_submit_tag, #label_tag, #month_field_tag, #number_field_tag, #password_field_tag, #radio_button_tag, #range_field_tag, #search_field_tag, #select_tag, #submit_tag, #telephone_field_tag, #text_area_tag, #text_field_tag, #time_field_tag, #url_field_tag, #utf8_enforcer_tag, #week_field_tag

Methods included from ActionView::Helpers::FormOptionsHelper

#collection_check_boxes, #collection_radio_buttons, #collection_select, #grouped_collection_select, #grouped_options_for_select, #option_groups_from_collection_for_select, #options_for_select, #options_from_collection_for_select, #select, #time_zone_options_for_select, #time_zone_select

Methods included from ActionView::Helpers::FormHelper

#check_box, #color_field, #date_field, #datetime_field, #email_field, #fields_for, #file_field, #form_for, #hidden_field, #label, #month_field, #number_field, #password_field, #radio_button, #range_field, #search_field, #telephone_field, #text_area, #text_field, #time_field, #url_field, #week_field

Methods included from ActionView::RecordIdentifier

#dom_class, #dom_id

Methods included from ActionView::ModelNaming

#convert_to_model, #model_name_from_record_or_class

Methods included from ActionView::Helpers::DebugHelper

#debug

Methods included from ActionView::Helpers::DateHelper

#date_select, #datetime_select, #distance_of_time_in_words, #select_date, #select_datetime, #select_day, #select_hour, #select_minute, #select_month, #select_second, #select_time, #select_year, #time_ago_in_words, #time_select, #time_tag

Methods included from ActionView::Helpers::CsrfHelper

#csrf_meta_tags

Methods included from ActionView::Helpers::ControllerHelper

#assign_controller, #logger

Methods included from ActionView::Helpers::CacheHelper

#cache, #cache_fragment_name, #cache_if, #cache_unless

Methods included from ActionView::Helpers::AtomFeedHelper

#atom_feed

Methods included from ActionView::Helpers::AssetUrlHelper

#asset_path, #asset_url, #audio_path, #audio_url, #compute_asset_extname, #compute_asset_host, #compute_asset_path, #font_path, #font_url, #image_path, #image_url, #javascript_path, #javascript_url, #stylesheet_path, #stylesheet_url, #video_path, #video_url

Methods included from ActionView::Helpers::AssetTagHelper

#audio_tag, #auto_discovery_link_tag, #favicon_link_tag, #image_alt, #image_tag, #javascript_include_tag, #stylesheet_link_tag, #video_tag

Methods included from ActiveSupport::Benchmarkable

#benchmark

Methods included from ERB::Util

h, html_escape, html_escape_once, json_escape, unwrapped_html_escape

Methods included from ActionView::Context

#_layout_for, #_prepare_context

Constructor Details

This class inherits a constructor from ActionView::Base

Instance Method Details

#debug_hash(object) ⇒ Object


36
37
38
# File 'actionpack/lib/action_dispatch/middleware/debug_exceptions.rb', line 36

def debug_hash(object)
  object.to_hash.sort_by { |k, _| k.to_s }.map { |k, v| "#{k}: #{v.inspect rescue $!.message}" }.join("\n")
end

#debug_headers(headers) ⇒ Object


28
29
30
31
32
33
34
# File 'actionpack/lib/action_dispatch/middleware/debug_exceptions.rb', line 28

def debug_headers(headers)
  if headers.present?
    headers.inspect.gsub(',', ",\n")
  else
    'None'
  end
end

#debug_params(params) ⇒ Object


16
17
18
19
20
21
22
23
24
25
26
# File 'actionpack/lib/action_dispatch/middleware/debug_exceptions.rb', line 16

def debug_params(params)
  clean_params = params.clone
  clean_params.delete("action")
  clean_params.delete("controller")

  if clean_params.empty?
    'None'
  else
    PP.pp(clean_params, "", 200)
  end
end