I am trying to do an autocomplete with jquery and ruby

I’m not sure what is wrong with this code. I am trying to do an
autocomplete feature with a list that gathers information from the
database. It doesn’t seem to be working and I’m stuck as to what is
wrong. The only thing I can surmise that is wrong is the double quotes.
I know that everything is correct up with generating the list. When I
view the source file,
available tags = [“Zurich North America”];

I try to check it and nothing seems to come up when I start typing.
Can anyone help me?

On Mon, 10 Jun 2013 16:10:36 +0200, Ronald R. [email protected]
wrote:

var availableTags = [<%= @availableTags.map(&:to_s).join(", ") %>];

This doesn’t output what you think it does. The output is not valid
JavaScript.

I want to output a list that is kinda list [‘option1’,‘option2’]
How would I convert a list in ruby to javascript? I found this map
function online when I searched for it. Is there another way? Thanks for
the response btw!