Forum: Ruby on Rails Generating a css file from ruby code

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Gavin (Guest)
on 2009-04-15 23:18
(Received via mailing list)
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

-:)
This topic is locked and can not be replied to.