Class: Footnotes::Notes::SessionNote
Instance Method Summary
collapse
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, #valid?
Constructor Details
#initialize(controller) ⇒ SessionNote
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/rails-footnotes/notes/session_note.rb', line 4
def initialize(controller)
session = controller.session
if session
if session.respond_to? :to_hash
session = session.to_hash
else
session = session.data
end
end
@session = (session || {}).symbolize_keys
end
|
Instance Method Details
#content ⇒ Object
22
23
24
|
# File 'lib/rails-footnotes/notes/session_note.rb', line 22
def content
mount_table_for_hash(@session, :summary => "Debug information for #{title}")
end
|
#title ⇒ Object
18
19
20
|
# File 'lib/rails-footnotes/notes/session_note.rb', line 18
def title
"Session (#{@session.length})"
end
|