33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
<beginfold id='1'><!--</beginfold id='1'> Ruby/Rails/RHTML Example <endfold id='1'>--></endfold id='1'>
|
|
|
|
<h1>Listing Books</h1>
|
|
|
|
<beginfold id='2'><table</beginfold id='2'>>
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Content</th>
|
|
<th colspan="3"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @books.each <beginfold id='3'>do</beginfold id='3'> |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: <beginfold id='3'>{</beginfold id='3'> confirm: "Are you sure?" <endfold id='3'>}</endfold id='3'> %></td>
|
|
</tr>
|
|
<% <endfold id='3'>end</endfold id='3'> %>
|
|
</tbody>
|
|
<endfold id='2'></table</endfold id='2'>>
|
|
|
|
<br>
|
|
|
|
<%= link_to "New book", new_book_path %>
|
|
|
|
<beginfold id='1'><!--</beginfold id='1'> GDL input <endfold id='1'>--></endfold id='1'>
|
|
<% code<beginfold id='4'> %</beginfold id='4'>Q: text \: text<endfold id='4'> :</endfold id='4'> code %>
|