Thank you for your insight Sergio! I went with downgrading the recordselect. This is working perfect now.
#Gemfile gem 'recordselect', :git => 'git://github.com/scambra/recordselect.git', :tag =>'v3.3.0' On Fri, Jan 2, 2015 at 2:48 AM, Sergio Cambra <[email protected]> wrote: > delayedObserver code was updated on ActiveScaffold and RecordSelect. You > are using a new recordselect version (with updated code) with an old > ActiveScaffold version (with old code). You can downgrade recordselect to > 3.3.0, upgrade ActiveScaffold, or try to set this code above activescaffold: > > > > if (typeof(jQuery.fn.delayedObserver) === 'undefined') { > > (function($){ > > $.extend($.fn, { > > delayedObserver: function(callback, delay, options){ > > return this.each(function(){ > > var el = $(this); > > var op = options || {}; > > el.data('oldval', el.val()) > > .data('delay', delay || 0.5) > > .data('condition', op.condition || function() { return > ($(this).data('oldval') == $(this).val()); }) > > .data('callback', callback) > > [(op.event||'keyup')](function(){ > > if (el.data('condition').apply(el)) { return; } > > else { > > if (el.data('timer')) { clearTimeout(el.data('timer')); } > > el.data('timer', setTimeout(function(){ > > var callback = el.data('callback') > > if (callback) callback.apply(el); > > }, el.data('delay') * 1000)); > > el.data('oldval', el.val()); > > } > > }); > > }); > > } > > }); > > })(jQuery); > > }; > > > > Copy this code to a file and require it above activescaffold on your > assets manifest. > > > > El Miércoles, 31 de diciembre de 2014 09:29:33 coalex escribió: > > > I do get a request to the browse action when I click on the form field, > but > > > only once, it is not kept alive as I type. > > > If I click off the field and then back on, it will send a request with > > > what ever I typed before. > > > > > > Maybe a jquery issue? I'm poking on it today. > > > > > > On Wednesday, December 31, 2014 12:45:52 AM UTC-7, Sergio Cambra wrote: > > > > Do you get requests to browse action on server or network tab of web > > > > > > > > inspector? > > > > > > > > El Martes, 30 de diciembre de 2014 16:27:29 coalex escribió: > > > > > Hey Serg, > > > > > > > > > > I wanted to have an autocomplete field on a few forms where the drop > > > > > > > > downs > > > > > > > > > are getting too long. > > > > > > > > > > So... > > > > > > > > > > I got recordselect working, but the list of options do not > dynamically > > > > > > > > > > update as I type in the form field. > > > > > > > > > > There are no obvious errors in the console. > > > > > > > > > > Any ideas, Thank you!! > > > > > > > > > > > > > > > > > > > > Started GET "/locationtypes/browse?search=" for 127.0.0.1 at > 2014-12-30 > > > > > > > > > > 17:22:05 -0700 > > > > > > > > > > Processing by LocationtypesController#browse as */* > > > > > > > > > > Parameters: {"search"=>""} > > > > > > > > > > (1.0ms) SELECT COUNT(*) FROM "locationtypes" > > > > > > > > > > Rendered > > > > > > > > .../gems/recordselect-d5ed9fff0efc/app/views/record_select/_ > search.html.er > > > > b > > > > > > > > > (1.0ms) > > > > > > > > > > Locationtype Load (2.0ms) SELECT "locationtypes".* FROM > "locationtypes" > > > > > > > > > > ORDER BY name LIMIT 12 OFFSET 0 > > > > > > > > > > Rendered > > > > > > > > > > .../gems/recordselect-d5ed9fff0efc/app/views/record_select/_ > list.html.er > > > > > b > > > > > > > > > > (5.0ms) > > > > > > > > > > Rendered > > > > > > > > .../gems/recordselect-d5ed9fff0efc/app/views/record_select/_ > browse.html.er > > > > b > > > > > > > > > (17.0ms) > > > > > > > > > > Completed 200 OK in 83.0ms (Views: 73.0ms | ActiveRecord: 5.0ms) > > > > > > > > > > > > > > > > > > > > Rails 3.2.17 > > > > > > > > > > active_scaffold (3.3.3) > > > > > > > > > > recordselect 3.4.3 from git://github.com/scambra/recordselect.git > (at > > > > > > > > > > master) > > > > > > > > > > jquery-rails 3.0.4 > > > > > > > > > > jquery-ui-rails 4.1.0 > > > -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails Gem" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/activescaffold. For more options, visit https://groups.google.com/d/optout.
