title: textarea character count in Rails
body: <p>I want to use <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M002183" rel="nofollow noreferrer"><code>observe_field</code></a> to give me the character count of the textarea, updated as you type. What am I doing wrong here?</p>
  
  <pre><code>&lt;div class="field"&gt;
    &lt;%= observe_field :micropost_content,
        :function =&gt; "$('micropost_content').value.length" %&gt;
    &lt;%= f.text_area :content %&gt;
  &lt;/div&gt;
  </code></pre>