RubyRedGrapefruit
RubyRedGrapefruit

Reputation: 12214

How can I compile stylesheets dynamically in Rails 3.2?

I have an application with a subdomain for each customer. They can change the look and feel, which is all based on Twitter Bootstrap. When they save their settings, the app creates a .less stylesheet for them, where the appropriate Twitter Bootstrap variables have been set to their liking.

I the appropriate stylesheet in my application.html.erb file based on what subdomain was accessed. I know that won't work in production.

I'd like to invoke something to compile it as it is saved. Any thoughts?

Upvotes: 1

Views: 105

Answers (1)

Arctodus
Arctodus

Reputation: 5847

It sounds like you need to be able to trigger Sprocket compilation of these files on demand during run time. I have no experience with it, but this guy has: http://www.krautcomputing.com/blog/2012/03/27/how-to-compile-custom-sass-stylesheets-dynamically-during-runtime/

Upvotes: 1

Related Questions