title: How javascript knows about the current locale in Rails 3?
body: <p>I'm trying to get a <strong>resouce</strong> from my autocomplete.js.coffee(.erb) file. The resource's URL is dependent on the current locale. That is,</p>
  
  <blockquote>
    <p>/en/ajax/posts</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>/he/ajax/posts</p>
  </blockquote>
  
  <p>Please note the /en/.</p>
  
  <p>The problem is, I cannot determine the locale from within the .js file.</p>
  
  <ul>
  <li>Rails Guides does not provide enough info </li>
  <li>i18n-js gem isn't working for me, i.e. I18n.locale gives me null</li>
  </ul>
  
  <p>Please help.</p>