2016-06-21 3 views
0

Ruby-on-Railsブログのウェブサイトをコメントやタグで作成する方法についてはtutorialに従っており、これまでのところ私の仕事はhttps://github.com/khpeek/jumpstart-blogger/になっています。テーブルから列を削除する

最後に、作成者がユーザー名とパスワードを作成できるようにします。あなたが見ることができるように、「パスワード」および「パスワードの確認」、私はしたいと空白列がある

enter image description here

:ページのうちの1つは、「魔術」宝石から作者のデフォルトのリストです削除したい

このページの外観は、私があれば私の考えは、

<th>Password</th> 
    <th>Password confirmation</th> 

<td><%= author.password %></td> 
    <td><%= author.password_confirmation %></td> 

しかしコメントアウト行した

<p id="notice"><%= notice %></p> 

<h1>Listing Authors</h1> 

<table> 
    <thead> 
    <tr> 
     <th>Username</th> 
     <th>Email</th> 
     <th>Password</th> 
     <th>Password confirmation</th> 
     <th colspan="3"></th> 
    </tr> 
    </thead> 

    <tbody> 
    <% @authors.each do |author| %> 
     <tr> 
     <td><%= author.username %></td> 
     <td><%= author.email %></td> 
     <td><%= author.password %></td> 
     <td><%= author.password_confirmation %></td> 
     <td><%= link_to 'Show', author %></td> 
     <td><%= link_to 'Edit', edit_author_path(author) %></td> 
     <td><%= link_to 'Destroy', author, method: :delete, data: { confirm: 'Are you sure?' } %></td> 
     </tr> 
    <% end %> 
    </tbody> 
</table> 

<br> 

<%= link_to 'New Author', new_author_path %> 

読み込みapp/views/authors/index.html.erb、によって支配され

これを行うと、いくつかのテキストがメイン境界ボックスの外に配置されます:

enter image description here

それは間違ってここに何が起こっているコードのこの限られた部分から伝えることは可能ですか?

+0

あなたのコードを投稿することができますどのようにして、コードにコメントをしましたか? – Kld

答えて

1

これは、表を全幅に塗りつぶすスタイルがないために発生します。次のスタイルシートを追加

試してみてください。

<style> 
    table { width: 100%; } 
</style>