OK, you’re still here, which means you are not averse to some Coffeescript, so lets get started. The first thing we do is create a Base class that will house all code that should be run on every page.
1 2 3 4 5 6 7 8 9 10 11
Next, create a class for each Rails Controller, so for example if we have a Posts Controller in our app, we would create this Coffeescript class:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 2 3 4 5 6