/artists: sort autocomplete by post count.

* Add search[order]=post_count param to /artists.
* Make autocomplete do a prefix match ordered by post count, so that it
  works the same way that tag autocomplete does elsewhere.
This commit is contained in:
evazion
2017-04-07 17:20:57 -05:00
parent fbba167f0c
commit 6b462c865e
4 changed files with 9 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
<th><label for="search_order">Order</label>
<td>
<div class="input">
<%= select "search", "order", [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"]], :selected => params[:search][:order] %>
<%= select "search", "order", [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"], ["Post count", "post_count"]], :selected => params[:search][:order] %>
</div>
</td>
</tr>