When one does not change config.auto_load_paths in the
host app, by the time the deface.tweak_eager_loading initializer
runs, {app,railtie}.config.eager_load_paths is frozen.
Running reject! on a frozen Array results in an error, preventing
the host app from starting.
This commit modifies the initializer such that instead of modifying the
array, it is replaced by the modified array, preventing this error.
When one does not change
config.auto_load_paths
in the host app, by the time thedeface.tweak_eager_loading
initializer runs,{app,railtie}.config.eager_load_paths
is frozen.Running
reject!
on a frozen Array results in an error, preventing the host app from starting.This commit modifies the initializer such that instead of modifying the array, it is replaced by the modified array, preventing this error.