Class: MerbFootnotes::Notes::PartialsNote
- Inherits:
-
AbstractNote
- Object
- AbstractNote
- MerbFootnotes::Notes::PartialsNote
- Defined in:
- lib/merb_footnotes/notes/partials_note.rb
Instance Method Summary collapse
-
#content ⇒ Object
def link escape(Merb::Plugins.config[:prefix] + filename) end.
-
#initialize(controller) ⇒ PartialsNote
constructor
A new instance of PartialsNote.
- #row ⇒ Object
- #title ⇒ Object
- #valid? ⇒ Boolean
Methods inherited from AbstractNote
close!, #fieldset?, included?, #included?, #javascript, #legend, #link, #onclick, start!, #stylesheet, title, #to_sym, to_sym
Constructor Details
#initialize(controller) ⇒ PartialsNote
Returns a new instance of PartialsNote.
9 10 11 12 |
# File 'lib/merb_footnotes/notes/partials_note.rb', line 9 def initialize(controller) @controller = controller @partials = format_partials(@controller.footnotes[:partials]) end |
Instance Method Details
#content ⇒ Object
def link
escape(Merb::Plugins.config[:merb_footnotes][:prefix] + filename)
end
26 27 28 |
# File 'lib/merb_footnotes/notes/partials_note.rb', line 26 def content mount_table(@partials.unshift([:partial, :arguments])) end |
#row ⇒ Object
14 15 16 |
# File 'lib/merb_footnotes/notes/partials_note.rb', line 14 def row :edit end |
#title ⇒ Object
18 19 20 |
# File 'lib/merb_footnotes/notes/partials_note.rb', line 18 def title "Partials (#{@partials.size})" end |
#valid? ⇒ Boolean
30 31 32 |
# File 'lib/merb_footnotes/notes/partials_note.rb', line 30 def valid? prefix? end |