So in app/assets/javascript/faye.js.coffee.erb
I have the following:
$('#room_tag').bind('blur', () ->
alert('Hey!')
)
All the other code in it such as: sendmessage('room', 'message')
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:
(function() {
// your generated code here
}).call(this);
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?