How to keep your stylesheets clean and organized using Rails This tutorial covers building a web application from scratch using Rails with the styled_objects plugin. As an example we will be building a very static front-end website, mainly to focus on stylesheets. Everything you get from can be applied to more complex applications. Because this is such a simple application, we won’t be using scaffolding generators.
About styled_obejcts
styled_objects is a Rails plugin for simplifying stylesheet management on your application. Instead of having one or more large stylesheets on your public folder, have many. Keep your CSS close to their respective templates. styled_objects will compile them into one file per page.Getting started
1. Bootstrap your Rails app$ rails testapp2. Install the LESS gem: Edit your config/environment.rb and place, anywhere before the “end”: [ruby]config.gem ‘less’[/ruby] Run on the shell:
$ sudo rake gems:install2. install the styled_objects plugin
script/plugin install git://github.com/pgte/styled_objects.git