Class: MerbFootnotes::Notes::FiltersNote

Inherits:
AbstractNote show all
Defined in:
lib/merb_footnotes/notes/filters_note.rb

Instance Method Summary collapse

Methods inherited from AbstractNote

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

Constructor Details

#initialize(controller) ⇒ FiltersNote

Returns a new instance of FiltersNote.



6
7
8
9
# File 'lib/merb_footnotes/notes/filters_note.rb', line 6

def initialize(controller)
  @controller = controller
  @filters = parse_filters.compact
end

Instance Method Details

#contentObject



19
20
21
# File 'lib/merb_footnotes/notes/filters_note.rb', line 19

def content
  mount_table(@filters.unshift([:filter, :arguments]))
end

#legendObject



11
12
13
# File 'lib/merb_footnotes/notes/filters_note.rb', line 11

def legend
  "Filter chain for #{@controller.class.to_s}"
end

#titleObject



15
16
17
# File 'lib/merb_footnotes/notes/filters_note.rb', line 15

def title
  "Filters (#{@filters.size})"
end