0

I just upgraded my project from Rails 3.0.7 to 3.1.0 and I see that I can use SASS now.

I have a page in my application which is just a promotional page at /home/subscribe.html.erb and I would like it to not inherit the css declarations being used throughout the application like the scaffold.css. There is a separate subscribe.css file which I would like it to inherit ONLY.

Even though I have gone inside my application.css.scss and changed it to have only: @import "scaffold.css.scss"; the application.css.scss still gets inherited as a part of the application in to the subscribe page.

can you please suggest how to make the subscribe page ONLY use the subscribe.css file and no other css?

1 Answer 1

1

Create a new layout that has a css tag that directly targets the css file you wish to import rather than application.css.

Sign up to request clarification or add additional context in comments.

2 Comments

how will i tell rails that the susbscibe.html.erb is to use that new layout file I will create in the layout folder?
You can add layout :subscribe to the controller method. (This is all in the docs by the way.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.