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

  • Home
  • SEARCH
  • 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 6841851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:01:05+00:00 2026-05-27T00:01:05+00:00

In the Rails docs for the asset pipeline, it states: The default behavior in

  • 0

In the Rails docs for the asset pipeline, it states:

The default behavior in Rails 3.1 and onward is to concatenate all
files into one master file each for JS and CSS. However, you can
separate files or groups of files if required (see below)

How exactly do you separate the files into groups as indicated? For example, if I’ve got an application that also has an admin area, I’d like to create three compiled files:

shared.css (both front- and back-end use this)
application.css (front-end only)
admin.css (back-end only)

The default combines all my files into application.css.

  • 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-27T00:01:06+00:00Added an answer on May 27, 2026 at 12:01 am

    Apparently, my reading comprehension is quite lacking (tl;dr). It seems that when you use

    stylesheet_link_tag 'application'
    

    I looks to app/assets/stylesheets/application(css|sass) for a manifest file that defines which sheets to include.

    So I can just use

    stylesheet_link_tag 'admin'
    

    In my back-end to look for that manifest. So here’s how my assets structure ends up looking:

    /app
      /assets
        /stylesheets
          admin.css
          application.css
          /admin
            screen.css
          /application
            screen.css
          /shared
            layout.sass
            reset.css
            typography.sass
    

    admin.css and application.css are my manifests, and they look like this respectively:

    /** admin.css
     *= require_self
     *= require shared/reset
     *= require shared/layout
     *= require shared/typography
     *= require admin/screen
    */
    
    /** application.css
     *= require_self
     *= require shared/reset
     *= require shared/layout
     *= require shared/typography
     *= require application/screen
    */
    

    You can see that each just references the shared sheets and then requires the context-specific sheet.

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

Sidebar

Related Questions

In the Rails docs there seem to be different default locations for I18N strings,
The rails docs are apparently in error - http://guides.rubyonrails.org/association_basics.html#selfjoins ) In designing a data
I looked in the Rails docs under inflector and found this message... Module deprecated
I have read through the Rails docs for Routing , Restful Resources , and
the active admin docs says: If you are using Rails >= 3.1, you must
Can git bisect be used in auto-mode with rails? The docs for git bisect
Rails comes with a handy session hash into which we can cram stuff to
I am going through the Rails API docs for collection_select and they are god-awful.
I'm running a rails 3.1 app on Heroku Cedar stack which supports the asset
I noticed in the Rails docs here that the update_attributes method is deprecated: This

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.