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!, #escape, #has_fieldset?, #hash_to_xml_attributes, included?, #javascript, #legend, #mount_table, #mount_table_for_hash, #onclick, #prefix?, start!, #stylesheet, #title, title, #to_sym, to_sym

Constructor Details

#initialize(controller) ⇒ LayoutNote

Returns a new instance of LayoutNote.



4
5
6
# File 'lib/rails-footnotes/notes/layout_note.rb', line 4

def initialize(controller)
  @controller = controller
end

Instance Method Details



12
13
14
# File 'lib/rails-footnotes/notes/layout_note.rb', line 12

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

#rowObject



8
9
10
# File 'lib/rails-footnotes/notes/layout_note.rb', line 8

def row
  :edit
end

#valid?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/rails-footnotes/notes/layout_note.rb', line 16

def valid?
  prefix? && nil#@controller.active_layout TODO doesn't work with Rails 3
end