Generating a css file from ruby code

Hi all!

I’m playing around with an app at the moment in which users can
specify their own style settings for the majority of the HTML on their
profile through selecting some form options. Alternatively they can
upload a stylesheet of thier own if they have CSS experience.

I thought of a couple of different way of doing this but the most
logical way seemed to be creating a seperate stylesheet for each user
in the model and calling this stylesheet when the page is rendered.

I’ve created a plugin which takes a ruby hash and creates a hunk of
text which is then written to a css file.

http://github.com/GavinM/css_writer/tree/master

I’m just curious as to whether anyone can think of a better way of
doing this?

Also - this is my first plugin. I would welcome any feedback/
constructive criticism

thanks

-:slight_smile: