# Haml generated javascript

**URL:** <https://www.ruby-forum.com/t/haml-generated-javascript/195463>\
**Category:** Rails\
**Created:** [September 23, 2010, 2:44pm UTC](https://www.ruby-forum.com/t/haml-generated-javascript/195463 "2010-09-23T14:44:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sycofly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@sycofly](https://www.ruby-forum.com/u/sycofly)\
**Post date:** [September 23, 2010, 2:44pm UTC](https://www.ruby-forum.com/t/haml-generated-javascript/195463/1 "2010-09-23T14:44:18Z")

</div>

Hi guys,  
I’m a little stumped on how to get the output from a HAML generated  
list “= render :text =\> @providers.map(&:name)” called by the  
application.js  
$(document).ready( function(){  
$( ‘#user\_provider\_name’ ).autocomplete({  
url: ‘/providers.js’  
});  
});

into listed format ie.  
test\_01  
test\_02  
test\_03

currently the output is:  
["test\_02", "test\_01", "test\_03",  
"test"]  
which is shown as one string in the drop down box under the text  
field …

it seems to me the the autocomplete isn’t getting the data thus the  
lack of format

my devbox is running  
ruby:  
interpreter: “ruby”  
version: “1.9.2dev”  
date: “2010-07-11”  
platform: “i686-linux”  
patchlevel: “2010-07-11 revision 28618”  
full\_version: “ruby 1.9.2dev (2010-07-11 revision 28618) [i686- linux]”
