Class: MerbFootnotes::Notes::ViewNote

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

Instance Method Summary collapse

Methods inherited from AbstractNote

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

Constructor Details

#initialize(controller) ⇒ ViewNote

Returns a new instance of ViewNote.



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

def initialize(controller)
  @controller = controller
  @filename = get_filename
end

Instance Method Details



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

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

#rowObject



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

def row
  :edit
end

#titleObject



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

def title
  "View"
end

#valid?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/merb_footnotes/notes/view_note.rb', line 27

def valid?
  prefix?
end