How to use application.css.scss for all Ruby on Rails controllers?


I would like to ask a question, I write all CSS code in app\assets\stylesheets\application.css.scss file. But only first controller can use that file. When I link_to another controller, I can't use any CSS code.

Can I use only one application.css.scss for all controllers in my application? such at background-color, margin, padding

This should already configure in new rails application which created by you.

You wants to use the css files in all the controller then initialize them into


like below example:

<%= stylesheet_link_tag    "css1","css2"%>

otherwise with one single line

<%= stylesheet_link_tag    "application", :media => "all" %>