## # Renders stylesheets from Ruby templates. # # No actions are needed...execution is passed down to the templates. # # Put a 'stylesheets' directory in app/views and fill it with templates # that end in '.sab'. # # app/views/stylesheets/application.sab # app/views/stylesheets/blog.sab # # Include them with a stylesheet_link_tag pointing to something like # # /stylesheets/application.css # /stylesheets/blog.css # # etc. # class StylesheetsController < ActionController::Base layout nil caches_page before_filter :set_content_type protected def set_content_type ::ActionController::Base.page_cache_extension = ".css" response.headers['Content-Type'] = "text/css; charset=utf-8" end end