Can you return this as a callback and insert the JS in the js files in `app/assets/javascripts`?