//= require_tree . to the bottom of your
application.js manifest file.
Also, isn't there potential for code that clashes too?
Or do you put a small
Do you no longer need require.js then?
EDIT: I appreciate all the answers… and I don't think they are really getting at the problem. Some of them are about styling and don't seem to relate… and others just mention
The best solution I can come up with is to wrap certain features in
div tags with
application.js file packaged by Sprockets.
My above solution has the benefit that if a search box is included on 8 of the 100 pages, it will run on only those 8 pages. You also won't have to include the same code on 8 of the pages on the site. In fact, you'll never have to include manual script tags on your site anywhere ever again.
I think this is the actual answer to my question.