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 6955935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:48:07+00:00 2026-05-27T14:48:07+00:00

By default, (at least, using scaffolding), Rails adds links to all stylesheets in the

  • 0

By default, (at least, using scaffolding), Rails adds links to all stylesheets in the /app/assets/stylesheets directory. I’d like to have multiple smaller stylesheets for organization, but only need to link to one that imports the rest in order to stay organized yet minimize HTTP requests.

Is there a way to disable this auto-inclusion, whether by configuring the asset pipeline or changing how they’re included in the layout itself?

FWIW, I’m including the main stylesheet from application.html.haml using stylesheet_link_tag "application".

  • 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-27T14:48:07+00:00Added an answer on May 27, 2026 at 2:48 pm

    You can do this by modifying your application.css(.scss) file.

    In that file there will be the following line:

    require_tree .
    

    Simply remove that and replace it with the includes you require.

    application.css

    require file1
    require nested/folders/file2
    

    Then you can have another file

    main.css

    require file2
    require file3
    

    And include them separately:

    stylesheet_link_tag "application"  
    stylesheet_link_tag "main"
    

    The stylesheet_link_tag can take an array too, if for some reason you want the css files to load in the same place, but with separate HTTP requests.

    stylesheet_link_tag ["application", "main"]
    

    The files with the requires are called manifest files.

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

Sidebar

Related Questions

I am using jquery datepicker http://jqueryui.com/datepicker/#default . I have to input fields like from
In Rails Controller, Using Scaffolding we generate default methods. Here One of the method
I'm using Phusion Passenger with a ruby app and I'd also like to set
Let's suppose I have a method like this: def foo Rails.cache.fetch(cache_key, :expires_in => 60.minutes)
Typically bignums are implemented by using multiple words, but I'd like to pick the
Ive recently started using Ruby on Rails for a project of mine and have
Possible Duplicate: Least Astonishment in Python: The Mutable Default Argument Python - Using the
There appears to be at least two ways to add a default constraint using
I am using Djangos default authentication system (django.contrib.auth) and I would like to add
I primarily program in Linux, using tcsh shell. By default, my current directory is

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.