Permalink
Browse files

indicate end of template

  • Loading branch information...
1 parent 4467365 commit c14e512e48fdbaa31dcd01d7402aa8d431e58ecc @fcheung committed Apr 3, 2009
Showing with 3 additions and 1 deletion.
  1. +1 −1 lib/tattler.rb
  2. +2 −0 test/tattler_test.rb
View
@@ -1,7 +1,7 @@
# Tattler
class ActionView::Template
def render_template_with_comment(*args)
- "<!-- TEMPLATE: #{self.relative_path} -->\n" + render_template_without_comment(*args)
+ "<!-- TEMPLATE: #{self.relative_path} -->\n" + render_template_without_comment(*args) + "\n<!-- ENDTEMPLATE: #{self.relative_path} -->"
end
alias_method_chain :render_template, :comment
end
@@ -13,6 +13,8 @@ class TattlerTest < ActionController::TestCase
<!-- TEMPLATE: views/dummy/index.html.erb -->
<!-- TEMPLATE: views/dummy/_some_partial.erb -->
Here is a partial
+<!-- ENDTEMPLATE: views/dummy/_some_partial.erb -->
+<!-- ENDTEMPLATE: views/dummy/index.html.erb -->
_HTML
assert_equal expected.strip, @response.body
end

0 comments on commit c14e512

Please sign in to comment.