Playing a little with coffeescript and Rails 3.1.0.rc4. Have this code:
yourMom = (location) -> console.log location yourMom \"wuz hur\"
this link might solve your problem Rails - Calling CoffeeScript from JavaScript Wrap your functions in a unique namespace and then you can acess these functions from wnywhere