order tag autocomplete by count

This commit is contained in:
r888888888
2013-06-06 17:13:19 -07:00
parent c97df48421
commit e4a7e88949

View File

@@ -36,7 +36,7 @@
$("#tags").autocomplete({
source: function(req, resp) {
$.getJSON(
"/tags.json?search[name_matches]=" + req.term + "*",
"/tags.json?search[order]=count&search[name_matches]=" + req.term + "*",
function(data) {
resp(data.map(function(x) {return x.name;}));
}