lib/rails-footnotes/notes/view_note.rb in rails3-footnotes-4.0.0.pre.6 vs lib/rails-footnotes/notes/view_note.rb in rails3-footnotes-4.0.0.pre.7
- old
+ new
@@ -8,14 +8,18 @@
def row
:edit
end
def link
- escape(Footnotes::Filter.prefix(Footnotes.view_subscriber.view, 1, 1))
+ escape(Footnotes::Filter.prefix(view, 1, 1))
end
def valid?
- prefix? && filename
+ prefix? && view
+ end
+
+ def view
+ @view ||= Footnotes.view_subscriber.view
end
end
end
end