So I’ve recently started to include quite a few .js files in to my web application and some of them depend on each other so load order is important.
However rails caching just seems to load a all.js file with no particular order to the files.
What’s a good way to solve this issue?
You can do as follows
Then load other scripts in the order that you want
<%= javascript_include_tag :defaults %><%= javascript_include_tag "script_1", "script_2", "script_3" %>