+1 for LIQUID and/or Haml and Sass. Interestingly enough there are some changes in the Sass 2.4 source code that might be exactly what you're looking for:
http://nex-3.com/posts/89-powerful-color-manipulation-with-sass Obviously it's edge at this point, but you can use the haml master branch to check out some of the new features mentioned in the article: http://github.com/nex3/haml Chris Eppstein has some nice examples of the Compass Color module here: http://chriseppstein.github.com/compass-colors/ Hope this helps a little bit. On Jan 15, 3:03 am, Marnen Laibow-Koser <[email protected]> wrote: > Alpha Blue wrote: > > I'm looking for 3 areas to work as dynamic assets: > > > image_path, javascript_path, and stylesheet_path > > > When I say dynamic, I mean that they will be dynamic through > > controller/models. > > That only barely helps clarify. Defining something by repetition > doesn't work. :) > > > I have been working through approx. 12 hours of > > searches to satisfy my answer to this question but am not finding much > > luck. > > > The closest things I've found enabling this are use of config for assets > > (which is normally done for CDNs), or monkey-patching the tag helpers, > > which still won't give me what I want. > > No, it probably won't unless you monkey-patch to look up the *current > user's* theme each time -- which is doable but potentially costly. > > > > > The reason why I want to do this is to provide for themes. As an > > example, if your rails app contained 20 different themes, a theme would > > be composed of layouts, images, javascripts, stylesheets, etc. You > > wouldn't want to have to change your theme through an initializer and > > stop/restart your app for it to work. I've already done a lot of leg > > work with getting my themes into the MVC structure. > > Is there a reason that you didn't use something like Liquid, which seems > to have been designed for exactly this purpose? > > > > > I just need the ability to change the three paths above using either a > > custom call to a module, or through the application controller. > > > Can it be done and if so, how? > > Of course it can be done by monkeypatching as described above. Whether > it should be done that way is another question. :) > > Another possibility: I recently found out that Haml can use Sass as a > markup filter. This has some interesting potential for dynamically > generated CSS. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > [email protected] > > > > > Many thanks. > > -- > Posted viahttp://www.ruby-forum.com/.
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

