You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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 theHamlCoffeeAssets.config
object. Any changes made toconfig.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.The text was updated successfully, but these errors were encountered: