Timing issue during configuration #69

janv opened this Issue Sep 13, 2012 · 1 comment


None yet
2 participants

janv commented Sep 13, 2012

When configuring hamlcoffee in application.rb, there's a timing issue.

Assigning something to a configuration option, for example config.hamlcoffee.customSurround = "..." must happen before loading Sprockets (The "sprockets.environment" initialization event to be precise).
Sprockets seems to be loaded as soon as config.assets is references in application.rb.

At the moment Sprockets is loaded, the options in the config.hamlcoffee configuration hash are loaded into the HamlCoffeeAssets.config object. Any changes made to config.hamlcoffee afterwards are not actually reflected in the configuration.

A first guess for a fix would be to assign config.hamlcoffee = HamlCoffeeAssets.config in the initializer, after the copying has been done so that future configuration options go straight to the configuration object.


netzpirat commented Sep 13, 2012

Thanks for pointing this out. The configuration is the most ugly part of Haml Coffee Assets and I really want to rewrite it in a better way. Will do that asap.

@netzpirat netzpirat closed this in 6286dcc Sep 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment