Permalink
Browse files

Updated to 0.3.3, fixed yet another issue with id_element

  • Loading branch information...
1 parent f3a0892 commit 83646273ae452d5830be6bedec8604c7cea47ab9 @dabit dabit committed Sep 13, 2010
Showing with 4 additions and 6 deletions.
  1. +1 −1 Gemfile.lock
  2. +3 −5 public/javascripts/autocomplete-rails.js
View
@@ -54,7 +54,7 @@ GEM
activesupport (= 3.0.0)
bundler (~> 1.0.0)
railties (= 3.0.0)
- rails3-jquery-autocomplete (0.3.2)
+ rails3-jquery-autocomplete (0.3.3)
railties (3.0.0)
actionpack (= 3.0.0)
activesupport (= 3.0.0)
@@ -19,11 +19,9 @@ $(document).ready(function(){
$(this).autocomplete({
source: $(this).attr('data-autocomplete'),
select: function(event, ui) {
- $(this).val(ui.item.value),
- function(){
- if ($(this).attr('id_element')) {
- $($(this).attr('id_element')).val(ui.item.id);
- }
+ $(this).val(ui.item.value);
+ if ($(this).attr('id_element')) {
+ $($(this).attr('id_element')).val(ui.item.id);
}
return false;
}

0 comments on commit 8364627

Please sign in to comment.