From 629240deebc1ecf838687e681af8a98fb80e1697 Mon Sep 17 00:00:00 2001 From: Ryunosuke Sato Date: Tue, 10 Nov 2026 01:51:57 +0900 Subject: [PATCH] Stop passing `format: :html` to the Ember app route Rails ignored a Symbol `format:` until rails/rails#59418, which turns it into a format requirement with `html` as the default. With that, the `(*rest)` glob of the route `mount_ember_app` draws swallowed the extension of an asset path such as `/assets/app.js`, the request's format became `html`, and `EmberConstraint` let it through, so assets were answered with the application's `index.html` instead of reaching the mounted `Rack::Files` or the development server proxy. The option has been a no-op on every Rails version the helper ran on until now, so dropping it keeps their behaviour and restores it on Rails main. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++++ lib/ember_cli/route_helpers.rb | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2da57a95..26c94c3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ main lines to the shell. An application, or an executable configured with an option such as `npm_path`, under a directory whose name contained a space or another character the shell treats specially failed to build or install +* Stop passing `format: :html` to the route `mount_ember_app` draws. Rails + ignored a Symbol `format:` until rails/rails#59418, which makes it a + format requirement with `html` as the default. With it, the route's glob + swallowed the extension of an asset path such as `/assets/app.js`, so the + request was treated as HTML and answered with the application's + `index.html` instead of reaching the mounted assets 0.14.2 ------ diff --git a/lib/ember_cli/route_helpers.rb b/lib/ember_cli/route_helpers.rb index 26ccb882..07fcb236 100644 --- a/lib/ember_cli/route_helpers.rb +++ b/lib/ember_cli/route_helpers.rb @@ -12,7 +12,6 @@ def mount_ember_app(app_name, to:, **options) routing_options.reverse_merge!( controller: "ember_cli/ember", action: "index", - format: :html, ) scope constraints: ::EmberCli::EmberConstraint.new do