1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Add a note to the haml_tag docs making it clear that it's invalid to use the return value.

Closes gh-8
This commit is contained in:
Nathan Weizenbaum 2009-06-07 01:41:30 -07:00
parent c06c9ab3db
commit 890614b3ca

View file

@ -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(<<MESSAGE)
haml_tag outputs directly to the Haml template.
Disregard its return value and use the - operator.
Disregard its return value and use the - operator,
or use capture_haml to get the value as a String.
MESSAGE
name = name.to_s