I'm using Slim in my Rails app and my table rows (tr) are not being interpreted inside a loop.
- if @item.suggestions.size > 0
table
- @item.suggestions.each do |suggestion|
tr
td=raw "<i>Posted by " + Shopper.find(suggestion.shopper_id).name + " at " + suggestion.created_at.to_formatted_s(:short) + ":</i>"
tr
td= suggestion.comment
This is what it output in the browser:
When I write the same table structure outside of the loop (see below) it works fine.
table
tr
td "Table row 1"
tr
td "Table row 2"