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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:29:35+00:00 2026-06-11T07:29:35+00:00

This isn’t something that I expected from the asset pipeline. Let’s say I have

  • 0

This isn’t something that I expected from the asset pipeline.

Let’s say I have a controller called “bugs_controller.rb”. Generating the controller also gives me a stylesheet in the asset pipeline called:

bugs.css.scss

Now, I use simple_form_for in my Rails 3.2.8 application. I want my form elements in this one controller to be laid out with float:le ft, so in bugs.css.scss I put:

.control-group {
  float: left;
}

But when I do that, it applies that style to ALL of my views.

That would mean that the Asset Pipeline provides a separation of concerns only for maintenance purposes with respect to CSS. Is this the normal functionality? If so, what is the reasoning behind loading CSS that the user doesn’t need on each page? Or is my application mistakenly loading bugs.css.scss on other views?

  • 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-06-11T07:29:36+00:00Added an answer on June 11, 2026 at 7:29 am

    Are you loading application.css? If you are and you have this line in there
    *= require_tree .
    Then all css files in stylesheets folder will be loaded. I’m new to rails 3 and not sure if this would be recommended way to do this but when I need to do what you’re asking, in my layout file, in the head tag after loading css files that need to be loaded everywhere I put

    <%= yield :css_files %> 
    

    and then in other view that require some other specific css files at the top of the file, I add

    <%= content_fo :css_files do %>
         <%= stylesheet_link_tag 'whatever.css' %>
    <% end %>
    

    Hopefully, this helps.

    Or you can always just wrap the form in a container with an id and in css target .control-group for that specific container:

    #form-wrapper .control-group
    {
         float: left;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This isn't about a specific problem I'm having, but I have to clear something
This isn't a question that I am expecting a specific answer to since it
This isn't meant as a troll or flamebait or anything like that. I've been
This isn't that big of a deal but I was wondering if it can
This isn't homework for me , it's a task given to students from some
This isn't a question that has a black/white yes/no answer, this is more a
This isn't really clearly documented, but a shallow search reveals that RIM's RAPC compiler
this isn't really an issue, but more of a concern that I would appreciate
This isn't actually a homework question per se, just a question that keeps nagging
This isn't a development question, I'm Looking for a plugin for Joomla that allows

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.