Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7446875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:27:16+00:00 2026-05-29T12:27:16+00:00

Using Rails 3.2.1 I created a simple controller called Home using the command: rails

  • 0

Using Rails 3.2.1


I created a simple controller called Home using the command:

rails g controller Home index

And it created a new controller and view for me:

enter image description here

Notice how there are two stylesheets, one “Application” and one “Home”. I can’t find any documentation to support this assumption but I’m guessing you put styles that will only be applied to the “Home” views, in the Home.css.scss file, correct?

So as a test, I added in some global styles to Application.css.scss.erb and ran the application.

The styles applied as expected.

Next, I added in some rules to the Home.css.scss file and I visited a “Home/index” view, yet the style in that file wasn’t attached, neither as a seperate CSS reference link, or even appended to the single Application.css.scss file. This is highly confusing to me, since the comments say:

// Place all the styles related to the Home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

Why aren’t the rules written in Home.css.scss applied to my website?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:27:17+00:00Added an answer on May 29, 2026 at 12:27 pm

    I don’t think it works that way (Home.css being applied only to Home controller actions). The different files are just for separation, to make it clearer what are the CSS rules describing. You can read this guide about the asset pipeline. I’m guessing you altered the default application.css.scss and removed the line importing all CSS files from app/assets/stylesheets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a clean and simple Rails 3.1 application called demo1. It contains two
I have created a simple API for a Rails application using token-based-authentication that supports
I am using Rails 2.3 and I decided to provide support for JSONP. Created
I'm using rails 2.3.4 When I execute rake db:test:prepare the id field created is
I have created a blog application using Ruby on Rails which includes the ability
using Ruby on Rails 2.3.2, since I already created Scaffold for Story, so instead
Using Rails v2.1, lets say you have an action for a controller that is
I've installed rails, the mysql2 gem, and mysql and have created a project called
I've created a simple rails app that has a people and a notes model.
I'm using Rails 3 to create a project that will need a model called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.