Class: Footnotes::Notes::CookiesNote

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

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, #valid?

Constructor Details

#initialize(controller) ⇒ CookiesNote

Returns a new instance of CookiesNote.


4
5
6
# File 'lib/rails-footnotes/notes/cookies_note.rb', line 4

def initialize(controller)
  @cookies = controller.request.cookies
end

Instance Method Details

#contentObject


12
13
14
# File 'lib/rails-footnotes/notes/cookies_note.rb', line 12

def content
  mount_table_for_hash(@cookies, :summary => "Debug information for #{title}")
end

#titleObject


8
9
10
# File 'lib/rails-footnotes/notes/cookies_note.rb', line 8

def title
  "Cookies (#{@cookies.length})"
end