From 890614b3ca1e8b32a441baa5c001972a9b46cc97 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sun, 7 Jun 2009 01:41:30 -0700 Subject: [PATCH] Add a note to the haml_tag docs making it clear that it's invalid to use the return value. Closes gh-8 --- lib/haml/helpers.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/haml/helpers.rb b/lib/haml/helpers.rb index cb562196..22775299 100644 --- a/lib/haml/helpers.rb +++ b/lib/haml/helpers.rb @@ -356,6 +356,11 @@ END # (`:/`, `:<`, and `:>`). # Currently, only `:/` and `:<` are supported. # + # `haml_tag` outputs directly to the buffer; + # its return value should not be used. + # If you need to get the results as a string, + # use \{#capture\_haml\}. + # # For example, # # haml_tag :table do @@ -396,7 +401,8 @@ END def haml_tag(name, *rest, &block) ret = ErrorReturn.new(<