Class: Footnotes::Notes::ParamsNote

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

Direct Known Subclasses

ParamsComponentNote

Instance Method Summary collapse

Methods inherited from AbstractNote

close!, #has_fieldset?, included?, #javascript, #legend, #link, #onclick, #row, start!, #stylesheet, title, #to_sym, to_sym, #valid?

Constructor Details

#initialize(controller) ⇒ ParamsNote

Returns a new instance of ParamsNote.



6
7
8
# File 'lib/rails-footnotes/notes/params_note.rb', line 6

def initialize(controller)
  @params = controller.params.symbolize_keys
end

Instance Method Details

#contentObject



14
15
16
# File 'lib/rails-footnotes/notes/params_note.rb', line 14

def content
  escape(@params.inspect)
end

#titleObject



10
11
12
# File 'lib/rails-footnotes/notes/params_note.rb', line 10

def title
  "Params (#{@params.length})"
end