Class: MerbFootnotes::Notes::LayoutNote

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

Instance Method Summary collapse

Methods inherited from AbstractNote

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

Constructor Details

#initialize(controller) ⇒ LayoutNote

Returns a new instance of LayoutNote.



9
10
11
12
# File 'lib/merb_footnotes/notes/layout_note.rb', line 9

def initialize(controller)
  @controller = controller
  @layout_path = find_layout
end

Instance Method Details



18
19
20
# File 'lib/merb_footnotes/notes/layout_note.rb', line 18

def link
  escape(Merb::Plugins.config[:merb_footnotes][:prefix] + @layout_path)
end

#rowObject



14
15
16
# File 'lib/merb_footnotes/notes/layout_note.rb', line 14

def row
  :edit
end

#valid?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/merb_footnotes/notes/layout_note.rb', line 22

def valid?
  prefix? and !@layout_path.blank?
end