mysterious-toddler-20573
07/15/2021, 1:38 PM/views/contacts/index.html.erb - main template for the contacts controller root URL
and if that has something like the active search pattern in it:
html
<h3>
Search Contacts
<span class="htmx-indicator">
<img src="/img/bars.svg"/> Searching...
</span>
</h3>
<input class="form-control" type="text"
name="search" placeholder="Begin Typing To Search Users..."
hx-post="/search"
hx-trigger="keyup changed delay:500ms"
hx-target="#search-results"
hx-indicator=".htmx-indicator">
<table class="table">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
</tr>
</thead>
<tbody id="search-results">
</tbody>
</table>
I'll use the ID of the element I am targeting for a template name:
/views/contacts/_search_result.html.erb