The default setting in my application.html.erb is:
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'true' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'true' %>
I have a cusom.css.scss file in app/assets/stylesheets which is included as part of the
application.css
file included in the site layout, supposedly because of the
stylesheet_link_tag 'application' line of code.
I therefore planned to put all the javascript (jQuery and bootstrap) for my application in custom.js inside app/assets/javascript.
Would rails automatically load this file or am I expected to explicitly tell rails to load it?
What confuses me is that in the Ruby on Rails tutorial, when jQuery is used, it is put inside the html.erb document, like in
Chapter 13, so that on the one hand it is used a custom.css.scss file as stylesheet, on the other hand, when javascript is required, it is inserted inside the html.erb document.