Under Rails 3.1, I\'m trying to find out how to move a few coffeescript classes away from my controller default coffeescript file (home.js.coffee) into another
home.js.coffee
You can also do it like this:
@app = window.app ? {} app.Foo = Foo
This will make app contain all your global classes, and window.app ? {} makes sure that you will only create one app.
app
window.app ? {}