Added CRUD but edit and delete giving errors.

This commit is contained in:
Your Name 2025-09-03 00:12:44 -05:00
parent 5c2466dfaf
commit 640e8d34ab
5 changed files with 54 additions and 5 deletions

View file

@ -12,6 +12,7 @@
<th>Evaluation Rate</th>
<th>Capabilities</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@ -25,10 +26,19 @@
<td><%= assistant.eval_rate || 'N/A' %></td>
<td><%= assistant.capabilities || 'N/A' %></td>
<td><%= assistant.created_at.strftime('%Y-%m-%d %H:%M') if assistant.created_at %></td>
<td>
<a class="button is-small is-info" href="/assistants/<%= assistant.id %>/edit">Edit</a>
<form method="post" action="/assistants/<%= assistant.id %>" style="display:inline;">
<input type="hidden" name="_method" value="delete">
<button class="button is-small is-danger" type="submit" onclick="return confirm('Are you sure?')">Delete</button>
</form>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>No assistants found in the database.</p>
<% end %>
<% end %>
<p><a class="button is-primary" href="/assistants/new">Add New Assistant</a></p>