Subtle rails syntax error

I'm trying to make a simple table in thin

table class="table table-striped"
  thead
    tr
      th username

it works fine, but when I try to add another th or tbody, I got a Malformed indentation error, for example, this code does not work for me

table class="table table-striped"
  thead
    tr
      th username
      th provider

or

table class="table table-striped"
  thead
    tr
      th username
  tbody
    tr
      td test

Can anybody help me?

+6
source share
1 answer

Without seeing the raw source, I can only guess that your text editor inserted tabs instead of spaces in subsequent lines with the same level of indentation. Make sure everyone has spaces?

+10
source

All Articles