title: how to pass an array of object (Users in my case) to jQuery script from controller
body: <p>I can't understand how to use variables initialized in the controller, for example, to jQuery script (autocomplete in my case). So I'm using Rails and get my authors list. How can I refernce them in jQuery script where I' d like to use jQuery autocomplete plugin like that:</p>
  
  <p>[code]
  $(document).ready(function() {
      $("#book_author").autocomplete(url or data, options );
    });
  [/code]
  So I should pass my authors array from the controler to the script. How to do that?</p>