Generic-user-small James West 70 posts

The book talks about setting colours in a style sheet (depot.css) and I was wondering if it would be possible to have these colours set from a database table which would presumably need ruby code embedded into the depot.css to call a method maybe in the application_helper.rb that reads colours from a database if it has not already read them?
Any ideas would be gratefully received

 
Generic-user-small Jason Frankl... 4 posts

div.app_base { width: 820px; background-color: <%= model.color =>; margin-left: auto; margin-right: auto;
}

 
Generic-user-small James West 70 posts

Thank you :-)

3 posts, 2 voices