Cosa sto facendo di sbagliato con questo helper per il mio modello HAML?haml_tag restituisce direttamente il modello 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
Questo è l'errore:
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.
Il modello sta chiamando display_event in questo modo:
- @events.each do |event|
= display_event(event)
Se stavo usando markup regolare sarebbe ampliare al seguente
%li.fooclass
%b Foo
%i Bar