Rails controller specific assets for selected controllers only
<p>I want to use the controller specific assets only for some controllers, but not for all. Hence, I didn't add the assets for which I don't need separate files. But this leads to 404 for those resources as they are not present, e.g. my <code>app/views/layouts/dashboard.html.erb</code> file contains the following piece of code to generate the controller specific js/css:</p>

<pre><code> &lt;%= stylesheet_link_tag 'dashboard', params[:controller], media: 'all' %&gt;
 &lt;%= javascript_include_tag 'dashboard', params[:controller] %&gt;
</code></pre>

<p>However, I do not want to create separate files for Admin controller, as the admins page has no new css/js required. But, app tries to locate the assets for the controller and since not found it returns the 404 as follows:</p>

<pre><code>GET http://dashboard.localhost.com:3000/stylesheets/dashboard/admins.css 404 (Not Found)
GET http://dashboard.localhost.com:3000/javascripts/dashboard/admins.js 404 (Not Found)
</code></pre>

<p>What should be done to prevent this?</p>

<p>Moreover, there are a few controllers for which the assets are obviously not required, e.g. Registrations controller, leading to 404 for <code>http://0.0.0.0:3000/stylesheets/store/registrations.css</code> for <code>http://0.0.0.0:3000/account/edit</code> page</p>