I have a folder structure like
project/app/views/api/users/_user.json.jbuilder
The error is
Searched in:
* "/Users/name/Desktop/etc/etc/project/app/views"
ActionView::MissingTemplate - Missing partial api/users/_user.json.jbuilder with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder]}.
I'm trying to render
<script type="text/javascript">
window.currentUser = <%= render("api/users/user.json.jbuilder",
user: current_user).html_safe %>
</script>
The exact same code worked in Rails 5.xx, but I'm on Rails 7.xx now and I'm stuck on this error.