rails 6.1
I am wanting to reference a partial in app/views/shared/
from another namespace.
# app/views/something/index.html.erb
<%= render partial: 'shared/my_partial' %>
# looks for app/views/shared/_my_partial.html.erb
# app/views/admin/something/index.html.erb
<%= render partial: 'shared/my_partial' %>
# looks for app/views/admin/shared/_my_partial.html.erb
When calling from within a namespace, the path always seems to be nested within that namespace, and cannot look outside of itself.
I have found this PR https://github.com/rails/rails/pull/22473 which would allow for denoting a leading /
or ./
to specify absolute path, but it appears to be unmerged for many years which doesn't fill me with hope.
Does anyone know how I can achieve this apart from duplicating the views?