Hello, new on Rails I have currently a problem. I am using autocomplete on a search form it is working well but to paginate I need to call the search action again and I don''t know how the variable should be named in params. Exemple: my autocomplete is :ingredient :name so what should be the xxxxx in the statement below :url => {:action => "search_ing", :params => {:xxxxx => @params[:ingredient][:name], :current_page => page}}) Thanks for your help Nicolas -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello again, Just to tell you that - I have looked in the generated source and apparently the name of the autocomplete field is "ingredient[name]" but it is not working with that name This is preventing me from continuing and deploying a new version for my test users. Thanks in advance for your help Nicolas -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Nicolas Aguttes wrote:> Hello again, > > Just to tell you that > - I have looked in the generated source and apparently the name of the > autocomplete field is "ingredient[name]" but it is not working with that > name > > This is preventing me from continuing and deploying a new version for my > test users. > > > Thanks in advance for your help > > NicolasHello after several tries it seems that putting the name between quotes works (it needs further testing to make sure I get the right results). :url => {:action => "search_ing", :params => {"ingredient[name]" => @params[:ingredient][:name], :current_page => page}}) I don''t know why, so there must be something I did not get with rails... -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---