Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timing issue during configuration #69

Closed
janv opened this issue Sep 13, 2012 · 1 comment
Closed

Timing issue during configuration #69

janv opened this issue Sep 13, 2012 · 1 comment

Comments

@janv
Copy link

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants