ruby on rails - Table row tr not being interpreted by Slim and missing in HTML output -
I am using slim in my rail app and my table rows (tr) can not be explained inside the loop. Used to be.
- If @ item.suggestions.size & gt; 0 table - @ item. Suggestions.each do | Tips | Tr td = raw "& lt; i & gt;" + Shopper.find (suggestion.shopper_id) .name + "Posted by" + suggestion.created_at.to_formatted_s (: short) + ": & lt; / i & gt; tr td = suggestion.comment This browser has:
< / P>
When I write a similar table structure outside of the loop (see below) it works fine.
table tr td "table row 1" tr td "table row 2 "
I have changed my code as a slim example code () Only the summit of the conference Yoga and solve the problem with it.
- If @ item.suggestions.any? Table # Suggestions - Suggestions @ item.suggestions tr td = suggestion.comment tr td = raw " Lt; I & gt; Posted by "+ shopper.find (suggestion.shopper_id) .name +" at "+ suggestion.created_at.to_formatted_s (: short) +": & lt; / I & gt; "
Comments
Post a Comment