I'm confused about how to use @inner_content

I’m trying to bring some dusty Phoenix code up to date and I’m very confused about how to use @inner_content. My app.html.eex file creates a my_assigns variable, based on assigns. It hands this (in various places) to the render/3 function.

I have no clue how to achieve the same functionality, using @inner_content. I’ve tried to read some docs on this, but I’m afraid they make my eyes cross. Might someone be able to offer me a clue?


I think there are two options:

  • Put edit_link, rel_url and source_link into conn.assigns before the view is rendered - something akin to a commonly used plug that adds current_user to the assigns,
  • Turn those into view helpers.