Hi there,
a simple n00b question:
I have that Javascript snippet on my page (see below; taken from jquery,
actually).
I want to pass it the "@cities" array from the controller. But what's
the correct syntax, here?
See the 3rd line:
========================================
<script>
$(document).ready(function(){
var data = @cities; <---- that's not correct, is it?
$("#city").autocomplete(data);
});
</script>
========================================
Thanks a lot for helping me!
Tom
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---