Class: Footnotes::Notes::ControllerNote

Inherits:
AbstractNote show all
Defined in:
lib/rails-footnotes/notes/controller_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) ⇒ ControllerNote

Returns a new instance of ControllerNote.



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

def initialize(controller)
  @controller = controller
end

Instance Method Details



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

def link
  if controller_filename && controller_line_number
    escape(Footnotes::Filter.prefix(controller_filename, controller_line_number + 1, 3))
  end
end

#rowObject



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

def row
  :edit
end

#valid?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/rails-footnotes/notes/controller_note.rb', line 20

def valid?
  prefix?
end