title: Meteor's template.rendered called before the page is actually rendered
body: <p>I'm trying to add autocomplete to an <code>input</code> tag when my page gets rendered.</p>
  
  <pre><code>Template.friends.rendered = function () {
      var users = Meteor.users.find({}).fetch();
      // this gets all usernames from the local minimongo
      var names = users.map(function (user) {
          return user.username;
      });
      console.dir($("#addFriendSearch"));
      $("#addFriendSearch").autocomplete({source: names});
      alert();
  };
  </code></pre>
  
  <p>The <code>console.dir</code> shows me that it couldn't find the <code>#addFriendSearch</code> element. To see when the rendered function gets called, I put the alert at the end of the function. The alert shows <strong>before</strong> my form gets rendered.</p>
  
  <p>I have found an alternative solution to this, which works perfectly, but I'm not content with it since <code>rendered</code> should just work.</p>
  
  <p>My alternative solution is to rename the <code>Template.friends.rendered</code> to <code>Template.friends.methods</code> and call it as a UI helper in the template like this:</p>
  
  <pre><code>&lt;template name="friends"&gt;
      ...
      {{methods}} &lt;!-- last in the template --&gt;
  &lt;/template&gt;
  </code></pre>