Skip to content

Commit ca25a15

Browse files
committed
Add support for data-min-length attribute
1 parent 88af3f2 commit ca25a15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/assets/javascripts/autocomplete-rails-uncompressed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
jQuery.railsAutocomplete.fn.extend({
4949
init: function(e) {
5050
e.delimiter = jQuery(e).attr('data-delimiter') || null;
51-
e.min_length = jQuery(e).attr('min-length') || 2;
51+
e.min_length = jQuery(e).attr('data-min-length') || jQuery(e).attr('min-length') || 2;
5252
e.append_to = jQuery(e).attr('data-append-to') || null;
5353
e.autoFocus = jQuery(e).attr('data-auto-focus') || false;
5454
function split( val ) {

lib/assets/javascripts/autocomplete-rails.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)