Generated scaffolding for model via Rails

This commit is contained in:
Prelang Builder authored and u7482 committed 2014-02-27 23:58:57 +00:00
1 parent 9921d3b6d6
commit aec5ca5c47
14 files changed
+209

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
<h1>Listing questions</h1>
<table>
<thead>
<tr>
<th>Title</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @questions.each do |question| %>
<tr>
<td><%= question.title %></td>
<td><%= link_to 'Show', question %></td>
<td><%= link_to 'Edit', edit_question_path(question) %></td>
<td><%= link_to 'Destroy', question, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Question', new_question_path %>