Implementing a Coffeescript Application in Rails
1 answer
Coffeescript is included as a default gem in Rails. Confirm your selection in the Gemfile.
Coffeescript is a language that compiles, so it won't appear on the page - when you create a file .coffee
, Rails will compile it to JavaScript on page load (or sooner, depending on how you compile the assets). The coffeescript page is included the same as the js page is included (open the page application.js
- it will have a comment explaining how to enable JS).
+2
source to share