2013-08-28 50 views
0

我想为我的模型制作表格,而我不喜欢它的外观。互联网上的例子看起来很正常,但我的视觉问题。我index.html.erb是导轨无法看到表格边缘

<table class="pretty"> 
    <tr> 
    <th><%= sortable "name" %></th> 
    <th><%= sortable "city" %></th> 
    <th><%= sortable "country" %></th> 
    <th><%= sortable "street_address" %></th> 
    <th><%= sortable "sector" %></th> 
    <th><%= sortable "telephone" %></th> 
    <th><%= sortable "fax" %></th> 
    </tr> 

    <% for company in @companies %> 
    <tr> 
    <td><%= company.name %></td> 
    <td><%= company.city %></td> 
    <td><%= company.country %></td> 
    <td><%= company.street_address %></td> 
    <td><%= company.sector %></td> 
    <td><%= company.telephone %></td> 
    <td><%= company.fax %></td> 
    </tr> 
    <% end %> 
</table> 

它应该是这样的:

矿看起来像这样:

回答

0

我一些基本的方式这样做。我将表格行改为:

<table class="pretty" border="1" cellpadding="10">