Scaffold Todo
This commit is contained in:
16
app/views/todos/index.html.erb
Normal file
16
app/views/todos/index.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<% content_for :title, "Todos" %>
|
||||
|
||||
<h1>Todos</h1>
|
||||
|
||||
<div id="todos">
|
||||
<% @todos.each do |todo| %>
|
||||
<%= render todo %>
|
||||
<p>
|
||||
<%= link_to "Show this todo", todo %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= link_to "New todo", new_todo_path %>
|
||||
Reference in New Issue
Block a user