I just want to add different CSS/JavaScript on different views. Obviously if I put them in layout, they will be added to each view. Also, I don't want to create separate layouts for different views.
I created a layout layouts/standard.html.erb with following content in head:
<head>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
</head>
This is adding no CSS/JavaScript from app/assets folder to the rendered page.
I also tried <%= yield :javascript %> in layout and content_for in the view using javascript_include_tag 'filename' but it is giving asset pipeline error.