Skip to main content

All Questions

0 votes
0 answers
326 views

How to fix jquery-ui rails autocomplete error(turbolinks:load) in rails

I'm working on autocomplete part in rails. I am using 'jquery-ui-rails' gem. while using $(document).ready it is working but it I use $( document ).on('turbolinks:load', function() {} it is not ...
b2j's user avatar
  • 21
0 votes
1 answer
301 views

How do I tell jquery autocomplete to display one item per line instead of the entire return value in one line?

I'm using Rails 5 with JQuery UI's autocomplete feature. I'm using AJAX to get the appropriate suggestions for my textbox ... $(function() { return $('#s').autocomplete({ source: function (...
user avatar
0 votes
1 answer
859 views

How do I tell my Rails controller to use the format.json part of my method instead of the format.html branch?

I'm running Rails and trying to set up an autocomplete on my text field. I want to submit to a controller method. If I'm submitting from my form (using the "Submit" button), I'd like to use the "...
user avatar
0 votes
1 answer
75 views

Rails Jquery-ui autocomplete with nested attribute

I am trying to use an autocomplete function for when the user attempts to enter in an license plate number into the appropriate rails form. I've been going through easyautocomplete and jquery-ui ...
Vesuvious's user avatar
  • 121
0 votes
0 answers
140 views

Rails 5: jQuery autocomplete json not rendering

I'm trying to implement a JQuery-ui autocomplete on a search form_tag. I have followed this in order to implement it. This is what I have done thus far but without the desired results: Installed the ...
Theopap's user avatar
  • 745
0 votes
1 answer
421 views

How to include links in jbuilder when using PG Multisearch to populate jQuery Autocomplete

I have built a simple autocomplete search and would like to be able to click on a result in much the same way I have enabled this on the search results page using <%= link_to pg_search.searchable....
dstep's user avatar
  • 145
0 votes
2 answers
6k views

jQuery-ui autocomplete, select first item

I use jQuery-ui autocomplete in my rails application. When I type some input I want it to automatically select the first item in the autocomplete box. How should I implement this? jQuery(function() { ...
KSHMR's user avatar
  • 55
0 votes
0 answers
283 views

_render function not working in autocomplete

I have integrated jQuery UI's autocomplete with Rails using the link below: http://www.lugolabs.com/articles/20-jquery-ui-autocomplete-with-ruby-on-rails For some reason I am getting this error: ...
user avatar
-1 votes
1 answer
4k views

Ruby on Rails - Google Autocomplete Location [closed]

I'm currently trying to implement an autocomplete location field but I'm unable to figure out how to get it working. Here is an example of what I'm trying to accomplish, except the map, I just need ...
advice's user avatar
  • 5,938
0 votes
1 answer
199 views

Ruby on Rails: Cant figure out why my jQuery-ui autocomplete isn't working?

I just followed a youtube tutorial on adding a jQuery-ui autocomplete feature to my search field. This is the link to the tutorial: https://www.youtube.com/watch?v=iMz8HmrQ350. For some reason it is ...
koz's user avatar
  • 305
1 vote
1 answer
138 views

rails-jquery-autocomplete: list populated from instance is blank

I am trying to setup rails-jquery-autocomplete gem and I have the jquery-ui-rails gem installed. I have a "transactions" model that has names and I want to access that list of names as the ...
SupremeA's user avatar
  • 1,609
0 votes
3 answers
833 views

Search and display multiple columns when using jquery autocomplete in Rails?

I have successfully integrated Jquery-Autocomplete into my rails app, currently users can search more than 5000+ airports and so far the integration works exactly as desired, however... Any Airport ...
Dearg's user avatar
  • 47
1 vote
0 answers
96 views

Profile image in Autocomplete Dropdown - Rails 4, Carrierwave

I'm trying to display a users profile image, along with their username in an autocomplete dropdown. The autocomplete functionality works fine, I'm just having trouble displaying the actual image in ...
Kraymer's user avatar
  • 13
0 votes
0 answers
83 views

Rails jquery-ui autocomplete

Hi I have been searching for a while now I do not understand why my autocomplete does not work using jquery-ui and rails. Lesson.rb: class Lesson < ActiveRecord::Base def self.search(term) ...
Snake's user avatar
  • 1,187
3 votes
1 answer
2k views

Uncaught TypeError: this.source is not a function when using rails4-autocomplete

I'm currently trying to set up autocomplete on a search field. I am using the rails4-autocomplete gem. I've read the documentation here: https://github.com/peterwillcn/rails4-autocomplete and followed ...
Nic's user avatar
  • 191
1 vote
2 answers
243 views

Jquery-UI's _render function not working in autocomplete

I am trying to use the autocomplete function in Jquery-UI. The backend seems to be working. It is printing out the correct objects and returning the correct json object, however, the _render function ...
user2871354's user avatar
0 votes
1 answer
54 views

What is the most professional way to implement autocomplete in Ruby on Rails?

I would like more to find out what approach is optimal. I would like to have a search form with a well-running autocomplete.
myf's user avatar
  • 185
0 votes
0 answers
104 views

Add parameter to rails3-jquery-autocomplete (now rails-jquery-autocomplete) in addition to "term"

When autocomplete sends the query string it contains a parameter of term. See here: Started GET "/nodes/autocomplete_user_first_name?term=Mi" for 127.0.0.1 Processing by NodesController#...
mike0416's user avatar
  • 461
0 votes
1 answer
371 views

Limit scope on rails-jquery-autocomplete (rails3-jquery-autocomplete) gem - where clause issue

There is a recommended solution and it seems to work. The issue is in my where clause and I'm not sure what's wrong. For reference, here is the solution(s): https://stackoverflow.com/a/7250426/...
mike0416's user avatar
  • 461
0 votes
1 answer
162 views

Ordering input by DESC breaks jQuery UI Autocomplete

I'm trying to input a table Page into jQuery UI Autocomplete. If I input it with Page.order('id ASC') it works perfectly, but if I input it with Page.order('id DESC') it breaks, even though the line ...
Jeff Caros's user avatar
0 votes
2 answers
1k views

Jquery ui autocomplete not working with rails 4.2

I'm working on a Rails 4.2 app (with Bootstrap) and trying to set up autocomplete in a text field. I'm following the Railscasts autocomplete association episode: My application.js looks like: //= ...
AarCee's user avatar
  • 863
1 vote
1 answer
974 views

How to customize jquery autocomplete 'No Search Result' message in Rails?

Here is the js code for jquery autocomplete in Rails 4.2 app: $(this).autocomplete({ minLength: 1, source: $(this).data('autocomplete-source'), select: function(event, ui) ...
user938363's user avatar
  • 10.2k
0 votes
1 answer
405 views

JSON for JQueryUI autocomplete - Rails

I'm working on an autocomplete form field and am having a little trouble formatting the JSON I want to pass into this. I'm using an ID field for the autocomplete, though the JSON is returning as ...
SRack's user avatar
  • 12k
0 votes
1 answer
207 views

How to fix this jQuery/coffeescript code for jquery-ui autocomplete?

Hi so I have code like for jquery-ui 1.11: jQuery -> $('#search_terms').autocomplete source: (request, response) -> $.ajax url: '/list.json' dataType: "json" ...
Nona's user avatar
  • 5,402
0 votes
1 answer
2k views

css of jquery ui autocomplete not being applied

I'm trying to implement jQuery ui's autocomplete. It's working, except that the css isn't being applied. 1) The list of colleges that appears is styled like a normal ul. 2) "11 results are available, ...
Adam Zerner's user avatar
  • 18.6k
0 votes
1 answer
374 views

Rails autocomplete on multiple categories

I am following Railscasts #399 to implement autocompletion in my search box using autocomplete from jquery-ui. However, I would also like to be able include which category each search suggestion ...
k_day's user avatar
  • 1,379
2 votes
2 answers
2k views

How to add link to all search below autocomplete popup in jQuery.ui.autocomplete?

I have search suggestion autocompletion using jQuery UI autocomplete plugin. http://jqueryui.com/autocomplete/ But how to add on the bottom of results popup item which behaves like on Quora(see below)...
tomekfranek's user avatar
  • 6,999
0 votes
1 answer
935 views

What's the event after selecting an entry in jquery autocomplete?

We have a rails 3.2.8 app with jquery autocomplete. The app should fire an event after user selects a customer name from the list (#invoice_customer_name_autocomplete). After selecting, an ajax change ...
user938363's user avatar
  • 10.2k
4 votes
2 answers
6k views

jQuery UI autocomplete field not submitting when pressing enter

I'm following the Railscast on this topic, and although the autocomplete feature works, I am unable to get it to submit the form when the user selects an item and presses enter. I have this (...
A4J's user avatar
  • 889
3 votes
3 answers
6k views

ruby on rails implement search with auto complete

I've implemented a search box that searches the "Illnesses" table and the "symptoms" table in my DB. Now I want to add auto-complete to the search box. I've created a new controller called "...
user429400's user avatar
  • 3,245
0 votes
1 answer
911 views

jQuery autocomplete multiples w/remote data through Rails

I am trying to set up jQuery autocomplete in Rails 3.2.0. I have it working fine if I set up an array in javascript as the data source. My problem is that the search terms will eventually become too ...
Ode's user avatar
  • 548
1 vote
1 answer
273 views

jquery auto complete plugin not working

I am trying to implement auto complete feature in my rails application.I am able to get print the array that i passed for the autocomplete.but the auto complete is not working. My controller code: ...
ramya's user avatar
  • 928
0 votes
1 answer
732 views

406 (Not Acceptable) error on rails and jquery mobile autocomplete

I keep getting this 406 (Not Acceptable) error when i type in an autocomplete field. I am using jquery mobile and jquery ui autocomplete and rails here is my jquery $("#request_artist").focus(...
Matt Elhotiby's user avatar
0 votes
1 answer
115 views

Jquery UI Problem with RoR

How do you get a list of all projects from a model such as Project.all and all the project.name's in there moved to a listed in javascript which is then printed out using Jquery UI Autocomplete Link ...
ahmet's user avatar
  • 4,995
1 vote
0 answers
550 views

How to format JSon for Jquery's Autocomplete

I'm writting an Autocomplete field using RoR and Jquery. When I call getJson: var aeropuertos; $.getJSON('web_services/get_airports', function(data) { aeropuertos = data; }); $("...
content01's user avatar
  • 3,185
7 votes
2 answers
3k views

Tagging with autocomplete in Rails

My (long, I apologize) question is a follow-on to: How to add tagging with autocomplete to an existing model in Rails? I am using acts-as-taggable-on and rails3-jquery-autocomplete, and trying to set ...
sscirrus's user avatar
  • 56.3k
1 vote
2 answers
526 views

Why is autocomplete not sending a JSON request

I'm trying to use the Jquery-UI autocomple in my rails app. Inside of my application.js I have the line $j('#autocomplete').autocomplete({ source:'contexts/1.json' }); From what I read on the ...
Teddy's user avatar
  • 589
3 votes
2 answers
3k views

jQuery UI Autocomplete with a JSON datasource generated from Rails - not working

I'm trying to set up an input tag with jquery autocomplete function, but it's doesn't work when Im referring to an external JSON data. It works perfectly, however, with local JSON-like array... Let me ...
sNiCKY's user avatar
  • 1,843
7 votes
2 answers
6k views

jQuery autocomplete - How to view item label but submit item value

I am totally new to javascript and am probably biting of more than I can chew, but I am trying to get the jQuery autcomplete widget working on my Rails site. I have a page called "links" ...
Oscar's user avatar
  • 3,248
55 votes
7 answers
36k views

How to set-up jquery-ui autocomplete in Rails

I need some help on how to implement a jquery-ui autocomplete in my Rails app. I want to add autocompletion to a text field where the user can enter in a customer name. As there can be hundreds of ...
Oscar's user avatar
  • 3,248