title: jQuery bind events with Rails/Coffeescript?
body: <p>So in <code>app/assets/javascript/faye.js.coffee.erb</code> I have the following:</p>
  
  <pre><code>$('#room_tag').bind('blur', () -&gt;
     alert('Hey!')
  )
  </code></pre>
  
  <p>All the other code in it such as: <code>sendmessage('room', 'message')</code> work just fine. And I can copy and paste the code generated from the block above and paste it into Chrome it works fine. I assume this is because, is it rails or coffeescript?, either way one of them, wraps the entire file in:</p>
  
  <pre><code>(function() {
    // your generated code here
  }).call(this);
  </code></pre>
  
  <p>Also would there happen to be a way for me to access methods that are defined within there? Is it possible to define a method in there without assigning it to a variable?</p>