Class: Footnotes::Notes::LayoutNote

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

Instance Method Summary collapse

Methods inherited from AbstractNote

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

Constructor Details

#initialize(controller) ⇒ LayoutNote

Returns a new instance of LayoutNote.



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

def initialize(controller)
  @controller = controller
end

Instance Method Details



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

def link
  escape(Footnotes::Filter.prefix(filename, 1, 1))
end

#rowObject



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

def row
  :edit
end

#valid?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/rails-footnotes/notes/layout_note.rb', line 18

def valid?
  prefix? && @controller.active_layout
end