Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

indicate end of template

  • Loading branch information...
commit c14e512e48fdbaa31dcd01d7402aa8d431e58ecc 1 parent 4467365
Frederick Cheung authored
2  lib/tattler.rb
... ...
@@ -1,7 +1,7 @@
1 1
 # Tattler
2 2
 class ActionView::Template
3 3
   def render_template_with_comment(*args)
4  
-    "<!-- TEMPLATE: #{self.relative_path} -->\n" + render_template_without_comment(*args)
  4
+    "<!-- TEMPLATE: #{self.relative_path} -->\n" + render_template_without_comment(*args) + "\n<!-- ENDTEMPLATE: #{self.relative_path} -->"
5 5
   end
6 6
   alias_method_chain :render_template, :comment
7 7
 end
2  test/tattler_test.rb
@@ -13,6 +13,8 @@ class TattlerTest < ActionController::TestCase
13 13
 <!-- TEMPLATE: views/dummy/index.html.erb -->
14 14
 <!-- TEMPLATE: views/dummy/_some_partial.erb -->
15 15
 Here is a partial
  16
+<!-- ENDTEMPLATE: views/dummy/_some_partial.erb -->
  17
+<!-- ENDTEMPLATE: views/dummy/index.html.erb -->
16 18
     _HTML
17 19
     assert_equal expected.strip, @response.body
18 20
   end

0 notes on commit c14e512

Please sign in to comment.
Something went wrong with that request. Please try again.