From 66548e21cf1d0c57bf7dee838a27130dfbf1a140 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Fri, 15 Mar 2013 19:13:58 -0500 Subject: [PATCH] story tag selector: only match at the beginning of the tag name makes much more sense when quickly typing in tag names to match the tag name you're typing, not a tag that has a description that contains a word with what you're typing --- app/assets/javascripts/application.js.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb index aeae5d2..a8b0339 100644 --- a/app/assets/javascripts/application.js.erb +++ b/app/assets/javascripts/application.js.erb @@ -301,6 +301,9 @@ $(document).ready(function() { $("#story_tags_a").select2({ formatSelection: function(what) { return what.id; + }, + matcher: function(term, text) { + return text.toUpperCase().indexOf(term.toUpperCase()) == 0; } });