title: Use Model in Ruby on Rails 3 as source for jQuery autocomplete
body: <p>I'm using simple jQuery for autocomplete and it works fine when I locally define the list of options in my jQuery. Here's the code (pretty much straight from the jQuery site):  </p>
  
  <pre><code>&lt;script&gt;
  jQuery(function() {
      var easy = [
          "one",
          "two",
          "three",
      ];
      jQuery( "#tags" ).autocomplete({
          source: easy
      });
  });
  &lt;/script&gt;
  
  
  
  &lt;div class="demo"&gt;
  
  &lt;div class="ui-widget"&gt;
  &lt;label for="tags"&gt;Tags: &lt;/label&gt;
  &lt;input id="tags"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I want to do is pass the entires on a model I have called user, which has a :name and :business_name attributes, and use the entries in that model for the options. Can I pass this data to my jQuery variable, or is this accomplished another way?</p>