Json View problem - Could not render / please define a matching clause for render/2 or define a template

I made it…thanks so far…

I am having the same trouble, and the same error

def render("networking.json", %{meetings: meetings}) do
 %{data: render_many(meetings, PageView, "networking.json")}
end

def render("networking.json", %{meeting: meeting}) do
   %{id: meeting.id,
   title: meeting.title}
end

The root key of the second parameter of the function below must match the view’s name.

views/page_view.ex
def render(“networking.json”, %{page: meeting}) do

2 Likes

This worked for me, thank you!

thanks for this, I have no documentation about this issue, and this get me a lot of elightenment ;D