Module naming convention for views in Phoenix 1.7

Hi,

I’m migrating a Phoenix website to the version 1.7 and one thing that got my attention is that the render function in a controller, for example page_controller.ex, expects the views to be in a module with the name page_html.ex in the case of HTML requests. Where can I read more about that convention? Is that something configurable? Thanks in advance.

Pedro

Where can I read more about that convention?

All the magic happens in the phoenix controller module:

Is that something configurable?

Yes, via put_view/2.

1 Like