[Rails] Re: autocomplete word by word

2012-05-07 Thread pepe
I think what Guillem is saying is that you can still do it with jQuery/ Javascript like you did before and that you'll need to control the logic yourself. On May 6, 5:02 pm, rubix Rubix wrote: > Hi, > I am trying to implement an autocomplete form with rails, I used jquery > in a first version, to

[Rails] Re: autocomplete word by word

2012-05-06 Thread Guillem Vidal
rubix Rubix wrote in post #1059751: > Hi, > I am trying to implement an autocomplete form with rails, I used jquery > in a first version, to suggest phrases to user and it worked > Now I am trying to have a service of autocomplete word by word, it means > when the user it typing in the text area, I

[Rails] Re: autocomplete

2012-04-04 Thread CavalryJim
On Apr 4, 6:07 am, "M.SH" wrote: > iam using rails 3.0.1 and i want a good plugin or gem for auto-complete > with Ajax and tutorial about it > > thanks > M.SH Try 'rails3-jquery-autocomplete'. I use it for all of my auto- complete fields. Install/usage instructions can be found here: https://

[Rails] Re: autocomplete depending on input of another field

2011-07-28 Thread Angelo Cordova
Thanks for your answer do you have any link to a site with examples or something like that I really don't know much about ajax On Jul 28, 1:20 am, Chirag Shah wrote: > You can call ajax request on change or on lost focus of the code field > For send ajax request you can do observe_field or use re

[Rails] Re: autocomplete depending on input of another field

2011-07-27 Thread Chirag Shah
You can call ajax request on change or on lost focus of the code field For send ajax request you can do observe_field or use remote_function - Chirag Shah http://blogofchirag.blogspot.com/ Angelo Cordova wrote in post #1013448: > Hello everyone > > I have the following problem. > > I have a model

Re: [Rails] Re: Autocomplete plugin

2011-05-11 Thread Walter Davis
On May 11, 2011, at 11:27 AM, Mlle wrote: Thanks for your comments. I understand what you're saying but I guess my question had more to do with the population of the actual list, not the database query. If you use the autocomplete plugin, the list that populates under the input box has to be

[Rails] Re: Autocomplete plugin

2011-05-11 Thread Mlle
Thanks for your comments. I understand what you're saying but I guess my question had more to do with the population of the actual list, not the database query. If you use the autocomplete plugin, the list that populates under the input box has to be a certain field of a certain model. For examp

[Rails] Re: Autocomplete plugin

2011-05-11 Thread pepe
If I understand well the question the answer should be yes. If what you mean is if it is possible to use one field on a page to find data in more than one column in the table it should be possible the only thing you would need is to query the table by the columns you desire to query on. On May 10,

[Rails] Re: autocomplete with extra data

2009-10-10 Thread Me
Anybody? this behaves like the select statement is not even there for some reason. On Oct 9, 3:39 pm, Chris Habgood wrote: > Ok here is the full code then. > <%= text_field_with_auto_complete :friend, :name,{:select => "NAME"}, > :after_update_element => "function(element,value){" + remote_func

[Rails] Re: autocomplete with extra data

2009-10-09 Thread Chris Habgood
Ok here is the full code then. <%= text_field_with_auto_complete :friend, :name,{:select => "NAME"}, :after_update_element => "function(element,value){" + remote_function(:url => { :controller => 'followerranking', :action => :ajax_add_friend }, :with => "'friend[name]=' + element.value") + "}" %>

[Rails] Re: autocomplete with extra data

2009-10-09 Thread mike
Wtf is this about? 2009/10/9, Me : > > I have the autocompleter using the :select => 'NAME' option. > > This is the partial: > > > <% @dt.each do |user| -%> > > <%=h user[0] %> > > <%= user[0] %> > > > <%= user[1] %> > > > <% end %> > > > I am getting all of the data when I select the nam

[Rails] Re: Autocomplete with DB + Urgent ..

2009-08-26 Thread Hemant Bhargava
Thanks a lot guyz .. done it using jquery library .. That library is using the data from a file.. and then i modified that file according to my modification .. and found solution .. :) Thanks for your support .. Mukund wrote: > http://codeintensity.blogspot.com/2008/02/auto-complete-text-field

[Rails] Re: Autocomplete with DB + Urgent ..

2009-08-26 Thread Mukund
http://codeintensity.blogspot.com/2008/02/auto-complete-text-fields-in-rails-2.html Google is your friend. ;) On Aug 26, 11:25 am, Hemant Bhargava wrote: > Ok .. Unable to do it .. > But found another way .. > Can you guyz tell me that how to write to a file at a specific position > .. > I mean

[Rails] Re: Autocomplete with DB + Urgent ..

2009-08-25 Thread Hemant Bhargava
Ok .. Unable to do it .. But found another way .. Can you guyz tell me that how to write to a file at a specific position .. I mean i want to write every time at line number 3 and character number 10 of file myfile.. Then how can i ..? I'll tell you the whole answer after resolving it .. :) Mu

[Rails] Re: Autocomplete with DB + Urgent ..

2009-08-25 Thread Mukund
Rails has scriptaculous and prototype built in and there are helpers for autocomplete already. Have a look at the API documentation for autocomplete. On Aug 25, 11:25 am, Hemant Bhargava wrote: > Hello Champs, > > I fetch out the values of a table (suppose users) from database and want > to sho

[Rails] Re: Autocomplete with DB + Urgent ..

2009-08-25 Thread Ar Chron
I would begin here: http://www.google.com/#hl=en&source=hp&q=rails+autocomplete&aq=f&aqi=g10&fp=c9fe100d9e542c1e As a personal note, I find that autocomplete works well for smaller, defined sets of possible inputs. People's names can be, well, almost anything, and I find autocomplete obtrusiv

[Rails] Re: autocomplete partial issue

2009-08-25 Thread Rob Biedenharn
On Aug 24, 2009, at 9:11 PM, Me wrote: > > I am getting a ton of \t for some reason in front and behind the > text. Anybody know why this is? If I comment out the image_tag it > does the same thing. > > <% unless @items.nil? %> > \t<% content_tag :ul, :class => "auto_complete" do %> > \t

[Rails] Re: Autocomplete with DB + Urgent ..

2009-08-25 Thread Dhruva Sagar
Yes of course you can do it.I did it recently, and I did it using jQuery with the plugin - http://dyve.net/jquery/?autocomplete I exposed the right JSON API's from my rails application and I had to tweak the plugin a bit to suit my needs but it works great. There are other jQuery plugins you could

[Rails] Re: Autocomplete Plugin - how can I use same "text_field_with_auto_complete" twice on one page?

2009-06-07 Thread Pat Shaughnessy
I ran into the same problem a while back and forked the plugin to fix it; see: http://patshaughnessy.net/repeated_auto_complete Hope this helps, - pat On Jun 2, 1:51 pm, Andy wrote: > Any ideas here? > > On May 28, 1:49 pm, Andy wrote: > > > I'm trying to use an autocomplete twice on the same

[Rails] Re: Autocomplete Plugin - how can I use same "text_field_with_auto_complete" twice on one page?

2009-06-02 Thread Andy
Any ideas here? On May 28, 1:49 pm, Andy wrote: > I'm trying to use an autocomplete twice on the same page, but only the > first one renders and functions. > > I'm using the Autocomplete Plugin and Rails 2.1 > > Thanks, > Andy --~--~-~--~~~---~--~~ You received th

[Rails] Re: autocomplete lookup speedup

2009-06-01 Thread nodoubtarockstar
Sorry, I got the conditions backwards, it was late :) And I also didn't replace my test data with your erb... > FasterCSV.foreach('CIS.csv') do |row| > port,ip,circuitid,node,eqpt,org = row > if connection.select_count("select count(1) from configuration_items > ci where ci.name='#{port}'") >

[Rails] Re: autocomplete lookup speedup

2009-06-01 Thread nodoubtarockstar
First, your find_or_creates are just a hack to not throw a runtime error if you were to try to call id on nil , while also setting conditions for your finder... Either way, Honestly, in my opinion, you'd be better off doing this in pure sql -- using Rails for this type of stuff is sometimes too s

[Rails] Re: autocomplete fill in text fields

2009-05-31 Thread Chris Habgood
WOW, that is cool. I cannot thank you enough. I guess I will learn to google properly. Never though of asking for the obvious. DOH!! On Sun, May 31, 2009 at 10:22 PM, Jonathan Rochkind < rails-mailing-l...@andreas-s.net> wrote: > > Actually, sorry, that page indeed didn't answer your question

[Rails] Re: autocomplete fill in text fields

2009-05-31 Thread Jonathan Rochkind
Actually, sorry, that page indeed didn't answer your question. Try this one though. Googled for "rails autocomplete multiple values" http://www.wayne-robinson.com/journal/2006/11/11/multiple-values-from-scriptaculous-autocomplete.html This is not something I've done myself before though, sorry.

[Rails] Re: autocomplete fill in text fields

2009-05-31 Thread Me
OK, pardon my ignorance I guess. Should I do set an instance variable for the output then use that in the RJS to populate the rest of the text_fields with the other data? Seems that is the way to go. On May 31, 9:56 pm, Jonathan Rochkind wrote: > Chris Habgood wrote: > > ok where do I do that

[Rails] Re: autocomplete fill in text fields

2009-05-31 Thread Jonathan Rochkind
Chris Habgood wrote: > ok where do I do that at? Have you tried googling for instructions? When I try: http://www.google.com/search?q=rails+autocomplete The first hit is: http://codeintensity.blogspot.com/2008/02/auto-complete-text-fields-in-rails-2.html Seems to me to tell you exactly what

[Rails] Re: autocomplete lookup speedup

2009-05-31 Thread Chris Habgood
Well this is crazy. I do most of my dev work on my computer I use as I work from home. Running Vista I was able to insert 388,000 records in 2:40 mins. I hesitated trying to do it on my laptop. BUT!! I am running winxp on it and I inserted 389,000 records in 40 mins. WOW! also in winxp the a

[Rails] Re: autocomplete lookup speedup

2009-05-30 Thread Conrad Taylor
2009/5/30 Maurício Linhares > > Have you tried to add a :limit clause to your select statement? > > Maybe show only the first 15 results and make sure there's an index at > the column being searched for. > > - > Maurício Linhares > http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.

[Rails] Re: autocomplete lookup speedup

2009-05-30 Thread Frederick Cheung
On May 30, 7:08 pm, Me wrote: > Is there anything I can do to speed up the query of a table that has > 380,000 entries and will only get bigger? > > I tried the recipe in the rails recipe book but the page takes a long > time just for the page to load due to the array being generated. Have you

[Rails] Re: autocomplete lookup speedup

2009-05-30 Thread Maurício Linhares
Have you tried to add a :limit clause to your select statement? Maybe show only the first 15 results and make sure there's an index at the column being searched for. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Sat, May 30, 2009 at 3:08 PM,

[Rails] Re: autocomplete fill in text fields

2009-05-29 Thread Chris Habgood
ok where do I do that at? On Fri, May 29, 2009 at 11:29 AM, jay wrote: > > When the autocomplete value is selected do an ajax call to your > application returning the data you need to fill in using a format you > can parse in JavaScript like JSON and set the form values. > > > On May 29, 12:36 a

[Rails] Re: autocomplete fill in text fields

2009-05-29 Thread jay
When the autocomplete value is selected do an ajax call to your application returning the data you need to fill in using a format you can parse in JavaScript like JSON and set the form values. On May 29, 12:36 am, Me wrote: > If you have an autocomplete and you have several text fields that hav

[Rails] Re: autocomplete on edit

2009-03-02 Thread Greg Donald
On Mon, Mar 2, 2009 at 7:10 PM, Me wrote: > > Is the normal autocomplete supposed to pull from the DB what is in the > field when doing an edit or is there something else that needs to be > done to get it to show up while doing an edit? I provide a Javascript array, using this method: def users

[Rails] Re: Autocomplete plugin with Rails 2.0

2009-02-07 Thread Ferit Öztosun
Tanks Elad Roz Attachment: auto_complete_macros_helper.rb (7,6 KB) your attachment it s work perfectly -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta

[Rails] Re: Autocomplete plugin with Rails 2.0

2009-02-06 Thread Gerrit Lewedag
> use :except instead of :exclude > > => protect_from_forgery :except => [:auto_complete_for_tag_name] http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html#M000493 -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~-

[Rails] Re: Autocomplete plugin with Rails 2.0

2009-02-06 Thread Gerrit Lewedag
Eric Pugh wrote: > I tried out adding the exclude line: > > protect_from_forgery :only => [:tag] > > However, it seems ugly that I have to add each method manually. I > tried > > protect_from_forgery :exclude => [:auto_complete_for_tag_name] > > but that didn't work. Is this oddness

[Rails] Re: autocomplete in rails

2008-11-24 Thread Ram
http://railsforum.com/viewtopic.php?id=23273 On Nov 24, 4:01 pm, Pandu <[EMAIL PROTECTED]> wrote: > Hai, > >       I am venkat. I am building one application in rails. In that i > want to implement autocomplete feature for one of my field (ex: > Project name) instead of entering entire name which

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-10-06 Thread Vinay
Anyone? This is the very last step in this implementation and im not able to find a solution by myself. On Oct 3, 10:38 am, Vinay <[EMAIL PROTECTED]> wrote: > @Xavier > I used a solution i had for auto_complete for the results. But there > are a few issues like the options list does not go away w

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-10-02 Thread Vinay
@Xavier I used a solution i had for auto_complete for the results. But there are a few issues like the options list does not go away when the user selects an option. I either need to press "esc" or click on some other part of the page for that to go away. And i cant use the mouse to select an opti

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-10-01 Thread Xavier Noria
On Wed, Oct 1, 2008 at 12:38 PM, Vinay <[EMAIL PROTECTED]> wrote: > For those interested, include an "informal" class for the element you > don't want to get in your text field. > :) works well. > @Xavier, Thanks for pointing me in the right direction with that! How > can i customize model_auto_c

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-10-01 Thread Vinay
For those interested, include an "informal" class for the element you don't want to get in your text field. :) works well. @Xavier, Thanks for pointing me in the right direction with that! How can i customize model_auto_completer_result to show more than one attribute in the results? like contact

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-09-29 Thread Xavier Noria
On Tue, Sep 30, 2008 at 8:01 AM, Vinay <[EMAIL PROTECTED]> wrote: > Thanks loads Xavier!! :) i just removed the div tags and kept the ul > and li tags like you said and it worked.. i cant believe it was so > simple!! been having this problem for quite a while! Also, I have > implemented your plug

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-09-29 Thread Vinay
Thanks loads Xavier!! :) i just removed the div tags and kept the ul and li tags like you said and it worked.. i cant believe it was so simple!! been having this problem for quite a while! Also, I have implemented your plugin and its working well.. thanks! :) Just one more thing i could never figu

[Rails] Re: autocomplete for

2008-09-29 Thread Rails Terrorist
is there any tutorial about it for has_many model? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonra

[Rails] Re: autocomplete for

2008-09-29 Thread David Rose
Try script/plugin install auto_complete doppler On Mon, Sep 29, 2008 at 7:49 AM, David Nguyen < [EMAIL PROTECTED]> wrote: > > Hi, > > I've got an old ruby app to update. > > I've got 2.1.0 Rails and the controllers to update has an > autocomplete_for macro. > > How can I update this, the API say

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-09-29 Thread Vinay
Xavier, Thanks for your reply. And i DID come across your plugin today :). So will try to implement it soon. However, I also want to understand why it is not working in Safari. If i remove the li and ul tags, the autocomplete results dont show up. The partial is rendered if i look into the dvlpmnt

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-09-29 Thread Xavier Noria
You need to leave the UL and LIs, only start with a bare <%=h this %> and <%= that %> without additional markup and no newline between the LI tags and the content. You can write your custom action in the controller to implement any search criteria, both in bare auto_complete and model_auto_comp

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-09-29 Thread Vinay
Also, how can i match more than one field in the Contact model? In the sense, the User can type either the contact name or the contact email and get relevant results. Like in Gmail. On Sep 29, 2:31 pm, Vinay <[EMAIL PROTECTED]> wrote: > Xavier, > Thanks for your reply. And i DID come across your

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-09-29 Thread Xavier Noria
On Mon, Sep 29, 2008 at 7:13 AM, Vinay <[EMAIL PROTECTED]> wrote: > 1.User starts typing > 2.Autocomplete kicks off and returns matching strings in relevant > attributes and Model. > 3.User scrolls down options and selects the one he/she wants. > 4.Selected option appears on the text box > 4a.T

[Rails] Re: Autocomplete plugin with Rails 2.0

2008-09-05 Thread Ricardo Gutiérrez
Bala Paranj wrote: > I installed the auto_complete plugin found at > http://svn.rubyonrails.org/rails/plugins/auto_complete. When I type a > character in the autocomplete field I get the following error: > > Processing EventsController#auto_complete_for_event_location (for > 127.0.0.1at 2007-10-2