ActionView::FileSystemResolver does not call find_templates anymore in version 6.0.
As a result, SirTrevorRails::ViewResolver#find_templates is never called.
It still works fine with simple controllers, but breaks when the controller has a namespace, e.g. Blog::PostsController. In that case, the resolver will prepend the namespace to the Sir Trevor block partial path, e.g. blog/sir_trevor/blocks/_text_block, and throw an ActionView::Template::Error: Missing partial exception.
Solution
Add SirTrevorRails::ViewResolver#_find_all, which is called by ActionView::FileSystemResolver v6. And leave find_templates for backward compatibility.
The integration tests are modified to use a controller namespace.
Problem
ActionView::FileSystemResolver
does not callfind_templates
anymore in version 6.0.As a result,
SirTrevorRails::ViewResolver#find_templates
is never called.It still works fine with simple controllers, but breaks when the controller has a namespace, e.g.
Blog::PostsController
. In that case, the resolver will prepend the namespace to the Sir Trevor block partial path, e.g.blog/sir_trevor/blocks/_text_block
, and throw anActionView::Template::Error: Missing partial
exception.Solution
Add
SirTrevorRails::ViewResolver#_find_all
, which is called byActionView::FileSystemResolver
v6. And leavefind_templates
for backward compatibility.The integration tests are modified to use a controller namespace.
Fixes madebymany/sir-trevor-rails#61