Passing assigns from different view modules

I’m trying to render a template from different view modules and keep running into the error:
assign @site_info not available in eex template.

This is what I’ve come up with so far inside my AppWeb.StoreView:
<%= render AppWeb.SiteInfoView, "show.html", Map.put(assigns, :action, Routes.site_info_path(@conn, :show, @site_info)) %>

How do you go about getting information from different templates in other view modules?

I figured out what I’m looking for is nested forms. If anyone has any good examples/tutorials for building a nested form (preferably not for user creation) please let me know!

You can try this thread:

Let me know if I helped.

1 Like