Ken W
Ken W

Reputation: 962

Rails: CSS: requiring css/scss associated with controller page view through application.css.scss

So I removed the /= requiretree line from the original application.css.scss but now I have to stylesheet_link_tag in each page for the specific .css since it's not requiring every single css file (as intended)

my question: how do I require in each specific controller view just the stylesheet rails associates with that controller? Is it some line I put in application.css.scss?

Again, I do NOT want every stylesheet loaded in every page which is why I removed requiretree

Upvotes: 0

Views: 192

Answers (1)

Yuri  Barbashov
Yuri Barbashov

Reputation: 5437

stylesheet_link_tag params[:controller] in layout and for production config assets pipeline to compile all files separatly

Upvotes: 1

Related Questions