Class Footnotes::Notes::ViewNote
In: lib/rails-footnotes/notes/view_note.rb
Parent: AbstractNote

Methods

filename   first_render?   link   new   row   valid?  

Public Class methods

[Source]

# File lib/rails-footnotes/notes/view_note.rb, line 6
      def initialize(controller)
        @controller = controller
        @template = controller.instance_variable_get(:@template)
      end

Public Instance methods

[Source]

# File lib/rails-footnotes/notes/view_note.rb, line 15
      def link
        escape(Footnotes::Filter.prefix(filename, 1, 1))
      end

[Source]

# File lib/rails-footnotes/notes/view_note.rb, line 11
      def row
        :edit
      end

[Source]

# File lib/rails-footnotes/notes/view_note.rb, line 19
      def valid?
        prefix? && first_render?
      end

Protected Instance methods

[Source]

# File lib/rails-footnotes/notes/view_note.rb, line 29
        def filename
          @filename ||= @template.instance_variable_get(:@_first_render).filename
        end

[Source]

# File lib/rails-footnotes/notes/view_note.rb, line 25
        def first_render?
          @template.instance_variable_get(:@_first_render)
        end

[Validate]