Add references between projects and todos
This commit is contained in:
@@ -21,6 +21,21 @@
|
||||
<%= form.textarea :description %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :completed %>
|
||||
<%= form.check_box :completed %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :priority %>
|
||||
<%= form.number_field :priority %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :project_id %>
|
||||
<%= form.collection_select :project_id, Project.all, :id, :name, prompt: "Select a project" %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.submit %>
|
||||
</div>
|
||||
|
||||
@@ -9,4 +9,18 @@
|
||||
<%= todo.description %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Completed:</strong>
|
||||
<%= todo.completed %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Priority:</strong>
|
||||
<%= todo.priority %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Project:</strong>
|
||||
<%= link_to todo.project.name, project_path(todo.project) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user