# Autocomplete and parameters name

**URL:** <https://www.ruby-forum.com/t/autocomplete-and-parameters-name/124004>\
**Category:** Rails\
**Created:** [December 23, 2007, 10:23am UTC](https://www.ruby-forum.com/t/autocomplete-and-parameters-name/124004 "2007-12-23T10:23:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tranquiliste](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@tranquiliste](https://www.ruby-forum.com/u/tranquiliste)\
**Post date:** [December 23, 2007, 10:23am UTC](https://www.ruby-forum.com/t/autocomplete-and-parameters-name/124004/1 "2007-12-23T10:23:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tranquiliste](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@tranquiliste](https://www.ruby-forum.com/u/tranquiliste)\
**Post date:** [December 23, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/autocomplete-and-parameters-name/124004/2 "2007-12-23T19:25:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tranquiliste](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@tranquiliste](https://www.ruby-forum.com/u/tranquiliste)\
**Post date:** [December 24, 2007, 7:49am UTC](https://www.ruby-forum.com/t/autocomplete-and-parameters-name/124004/3 "2007-12-24T07:49:15Z")

</div>

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
> 
> Nicolas

Hello 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…
