Fix setting custom preview_paths#2182
Conversation
|
Wow thanks for this! Any idea why the CI is failing? EDIT: also, can you add a changelog entry for this? |
No. It seems it is broken for a long time https://github.com/ViewComponent/view_component/actions/workflows/ci.yml
Sure. Can do. |
8be8086 to
092dda3
Compare
|
@Spone so, specs seem to fail because of #1659
is the error and then it exits. I assume that due to the fact that we now add We need to be that early though, because I don't know which problem #1659 solves. Maybe @camertron can shed some light? |
092dda3 to
432e826
Compare
Setting `preview_paths` to anything else than `test/components/previews` is broken, because we mutate `ActiveSupport::Dependencies.autoload_paths`. From the Rails guides: > Please do not mutate ActiveSupport::Dependencies.autoload_paths; > the public interface to change autoload paths is config.autoload_paths. Fixes ViewComponent#365
0574793 to
f9c886f
Compare
|
I have yet to be able to reproduce this issue, despite trying to do so in a greenfield Rails app and in tests on this repo: #2294. Closing. I'd be more than happy to pair with anyone who can reproduce it on their end! |
Setting
preview_pathsto anything else thantest/components/previewsis broken, because we mutateActiveSupport::Dependencies.autoload_paths.From the Rails guides:
Fixes #365