Skip to content

Commit 776c808

Browse files
fix(web): migrate controller macro to Phoenix 1.8 formats option
Replace the deprecated :namespace option with explicit :formats and an html layout plug to keep riveView/CarView resolution and the app layout behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1b67b36 commit 776c808

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
- build(deps): bump js-yaml from 4.2.0 to 4.3.1 in /website (#5597)
9797
- build(deps): bump brace-expansion from 1.1.14 to 1.1.18 in /website (#5596)
9898
- build(deps): bump fast-uri from 3.1.4 to 3.1.5 in /website (#5589)
99+
- build(deps): bump phoenix from 1.7.24 to 1.8.9 (#5572 - @JakobLichterfeld)
99100

100101
#### Dashboards
101102

lib/teslamate_web.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ defmodule TeslaMateWeb do
2424

2525
def controller do
2626
quote do
27-
use Phoenix.Controller, namespace: TeslaMateWeb
27+
use Phoenix.Controller,
28+
formats: [html: "View", json: "View", xml: "View"]
29+
30+
plug :put_layout, html: {TeslaMateWeb.LayoutView, :app}
2831

2932
import Plug.Conn
3033
use Gettext, backend: TeslaMateWeb.Gettext

0 commit comments

Comments
 (0)