Class: Footnotes::Notes::AssignsNote

Inherits:
AbstractNote show all
Defined in:
lib/rails-footnotes/notes/assigns_note.rb

Constant Summary collapse

@@ignored_assigns =
[
  :@real_format,
  :@before_filter_chain_aborted,
  :@performed_redirect,
  :@performed_render,
  :@_params,
  :@_response,
  :@url,
  :@template,
  :@_request,
  :@db_rt_before_render,
  :@db_rt_after_render,
  :@view_runtime
]
@@ignored_assigns_pattern =
/^@_/

Instance Method Summary collapse

Methods inherited from AbstractNote

close!, #escape, #has_fieldset?, #hash_to_xml_attributes, included?, #javascript, #legend, #link, #mount_table, #mount_table_for_hash, #onclick, #prefix?, #row, start!, #stylesheet, title, #to_sym, to_sym

Constructor Details

#initialize(controller) ⇒ AssignsNote

Returns a new instance of AssignsNote.



22
23
24
# File 'lib/rails-footnotes/notes/assigns_note.rb', line 22

def initialize(controller)
  @controller = controller
end

Instance Method Details

#contentObject



34
35
36
# File 'lib/rails-footnotes/notes/assigns_note.rb', line 34

def content
  mount_table(to_table, :summary => "Debug information for #{title}")
end

#titleObject



26
27
28
# File 'lib/rails-footnotes/notes/assigns_note.rb', line 26

def title
  "Assigns (#{assigns.size})"
end

#valid?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/rails-footnotes/notes/assigns_note.rb', line 30

def valid?
  assigns.present?
end