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:
parent
c06c9ab3db
commit
890614b3ca
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue