sprockets_helpers
🚀 Use Sprockets Helpers in Views​
Rails provides view helpers that automatically include your compiled asset files with fingerprinting and caching baked in. Use these helpers in your layouts for proper loading and cache invalidation.
<!-- app/views/layouts/application.html.erb -->
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>