aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-09-20 13:01:31 -0400
committerGitHub <noreply@github.com>2017-09-20 13:01:31 -0400
commit057de4f7c99a91211e04aa55cab07c12c448a1ef (patch)
tree0adf64b15605983e104023cd3155d9a214f0d078 /guides
parent30767f980faa2d7a0531774ddf040471db74a23b (diff)
parenta52e2bed8634531272018a4ae7ba389e1feebdf5 (diff)
downloadrails-057de4f7c99a91211e04aa55cab07c12c448a1ef.tar.gz
rails-057de4f7c99a91211e04aa55cab07c12c448a1ef.tar.bz2
rails-057de4f7c99a91211e04aa55cab07c12c448a1ef.zip
Merge pull request #30616 from yhirano55/update_layouts_and_rendering
Update Layouts and Rendering in Rails [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/layouts_and_rendering.md36
1 files changed, 19 insertions, 17 deletions
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index 76b325d0bf..fe2477f2ae 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -71,23 +71,25 @@ If we want to display the properties of all the books in our view, we can do so
<h1>Listing Books</h1>
<table>
- <tr>
- <th>Title</th>
- <th>Summary</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
-
-<% @books.each do |book| %>
- <tr>
- <td><%= book.title %></td>
- <td><%= book.content %></td>
- <td><%= link_to "Show", book %></td>
- <td><%= link_to "Edit", edit_book_path(book) %></td>
- <td><%= link_to "Remove", book, method: :delete, data: { confirm: "Are you sure?" } %></td>
- </tr>
-<% end %>
+ <thead>
+ <tr>
+ <th>Title</th>
+ <th>Content</th>
+ <th colspan="3"></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @books.each do |book| %>
+ <tr>
+ <td><%= book.title %></td>
+ <td><%= book.content %></td>
+ <td><%= link_to "Show", book %></td>
+ <td><%= link_to "Edit", edit_book_path(book) %></td>
+ <td><%= link_to "Destroy", book, method: :delete, data: { confirm: "Are you sure?" } %></td>
+ </tr>
+ <% end %>
+ </tbody>
</table>
<br>