Skip to content

Commit

Permalink
add year_acquired to view
Browse files Browse the repository at this point in the history
  • Loading branch information
one-m1nd committed Mar 5, 2024
1 parent 3fd1bcc commit 5d95b21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/views/plants/_plant.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
<td class="border border-slate-900"><%= @plant.name %></td>
</tr>

<tr>
<td class="border border-slate-900">Year Acquired</td>
<td class="border border-slate-900"><%= @plant.year_acquired %></td>
</tr>

<tr>
<td class="border border-slate-900">Family</td>
<td class="border border-slate-900"><%= @plant.family.name %></td>
Expand Down
2 changes: 2 additions & 0 deletions app/views/plants/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<th>Family</th>
<th>Genus</th>
<th>Status</th>
<th>Since</th>
<th>URL</th>
<th>Search</th>
</tr>
Expand All @@ -28,6 +29,7 @@
<td class="border border-slate-900"><%= plant.family.name %></td>
<td class="border border-slate-900"><%= plant.genus.name %></td>
<td class="border border-slate-900"><%= plant.status.name %></td>
<td class="border border-slate-900"><%= plant.year_acquired %></td>
<td class="border border-slate-900">
<a href="<%= plant_url(plant) %>">Show</a>
</td>
Expand Down

0 comments on commit 5d95b21

Please sign in to comment.