rails_live_reload icon indicating copy to clipboard operation
rails_live_reload copied to clipboard

Fix "config.enabled" not working

Open alhajrahmoun opened this issue 10 months ago • 0 comments

This is a proposed fix for #26.

The RailsLiveReload.enabled? check is currently performed immediately when the Railtie class is interpreted, returning true since it's the default value. However, due to the Rails application lifecycle, the state of RailsLiveReload.enabled? will change by the time the initializers are run and it will return the value specified in the rails app initializer.

I tried moving the RailsLiveReload.enabled? check into each initializer block and it seems to be fixing the issue.

alhajrahmoun avatar Apr 24 '24 22:04 alhajrahmoun