Bootstrap danger class not working for a table row

twitter-bootstrap gem is currently using bootstrap v 2.3.2.

And as per the Bootstrap version 2.3.2 Documentation For Tables following are the available row classes:

Optional row classes

Use contextual classes to color table rows.

.success    Indicates a successful or positive action.
.error      Indicates a dangerous or potentially negative action.
.warning    Indicates a warning that might need attention.
.info       Used as an alternative to the default styles.

Which is why .success worked but NOT .danger.

I suppose you are looking for .error class.


it seems to be a know bug with tables.

Looks like this is a know bug in v3.0.3 and will be fixed in v3.1.0

refer this bug error page and this stack question


go through the https://getbootstrap.com/docs/4.3/content/tables/#contextual-classes here they specified all row and cell classes, you should modify your

<table class='table table-bordered table-hover table-striped'>
<thead>
  <tr>
    <th>ID</th>
    <th>Status</th>
  </tr>
</thead>

<tbody>
  <tr class='table-danger'>//Modified line
    <td><%= order.id %></td>
    <td><%= order.status.name %></td>
  </tr>
</tbody>