I just decided to create a small Rails plugin called CssTree, the source and documentation is at:
http://github.com/cmanfu/css_tree
One thing that's nice about Rails is that the directory structure for your views is automatically assumed to follow the same structure as your controllers, without having to manually map anything. So why not extend that out to your CSS files? This follows in the good development practices of modular design and separation of concerns.
With CssTree, if a CSS file exists that maps to either the action, the controller, or the namespace of the controller that you're request is hitting, than that file will automatically get loaded into your view.
No comments:
Post a Comment