order tag autocomplete by count
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
$("#tags").autocomplete({
|
$("#tags").autocomplete({
|
||||||
source: function(req, resp) {
|
source: function(req, resp) {
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
"/tags.json?search[name_matches]=" + req.term + "*",
|
"/tags.json?search[order]=count&search[name_matches]=" + req.term + "*",
|
||||||
function(data) {
|
function(data) {
|
||||||
resp(data.map(function(x) {return x.name;}));
|
resp(data.map(function(x) {return x.name;}));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user