Skip to content
Valentin Ballestrino edited this page Apr 8, 2016 · 6 revisions

Create app.coffee file

Create app.coffee file

app/assets/javascript/admin/app.coffee`

Add CoffeeScript or Javascript

Para uses Turbolinks, so you'd want to bind to page:change event instead of document load

$(document).on 'page:change', ->
  alert('go for JS')

Forcing production compilation of your file

If the file you created isn't take into account when compiling your assets in staging / production, you can update your assets version in config/initializers/assets.rb to force the complete recompilation of your assets.

Clone this wiki locally