Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby Slim format for table

I have a question about the syntax for Slim

I have this code

  thead
    tr
      th Collection Names
  tbody
    td
      - @collection.each do |c|
        = c.name

Rails keeps on throwing the "Malformed indentation" error for the tag td for some reason. I'm a newbie in Slim. Any help is appreciated!

like image 829
RubyFanatic Avatar asked Mar 15 '26 06:03

RubyFanatic


1 Answers

I think you forgot to put your td tag isn't inside of a tr tag.

thead
  tr
    th Collection Names
tbody
  tr
    td
      - @collection.each do |c|
        = c.name
like image 135
jefflunt Avatar answered Mar 17 '26 22:03

jefflunt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!