Friday, May 31, 2013

How to control the order of css file inclusion in Rails 3.2 asset pipeline?

In your application.css remove the require_tree .
Then add the css files one by one in the order you would like it to be included in the html. Like this:

*= require_self
*= require 'form'
*= require 'layout-fix'

and so on. Just leave the require_self as it is. For a detailed explanation: RAILS ASSET PIPELINE HANDLING OF CSS & JS