¿Qué estoy haciendo mal con este ayudante para mi plantilla HAML?haml_tag salidas directamente a la plantilla de Haml
def display_event(event)
event = MultiJson.decode(event)
markup_class = get_markup_class(event)
haml_tag :li, :class => markup_class do
haml_tag :b, "Foo"
haml_tag :i, "Bar"
end
end
Este es el error:
haml_tag outputs directly to the Haml template.
Disregard its return value and use the - operator,
or use capture_haml to get the value as a String.
La plantilla está llamando display_event así:
- @events.each do |event|
= display_event(event)
Si yo estaba usando marcado regulares que ampliaría a la siguiente
%li.fooclass
%b Foo
%i Bar