Skip to content

Commit 59d2327

Browse files
committed
Explain the manifest link better and hide by default
1 parent 27439e9 commit 59d2327

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
<%%= yield :head %>
1212

13-
<!-- link rel="manifest" href="/manifest.json" -->
13+
<%%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
14+
<%%#= tag.link rel: "manifest", href: pwa_manifest_path %>
15+
1416
<link rel="icon" href="/icon.png" type="image/png">
1517
<link rel="icon" href="/icon.svg" type="image/svg+xml">
1618
<link rel="apple-touch-icon" href="/icon.png">

railties/lib/rails/generators/rails/app/templates/config/routes.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Rails.application.routes.draw do
77

88
<%- unless options.api? -%>
99
# Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb)
10-
# get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
1110
# get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
11+
# get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
1212

1313
<%- end -%>
1414
# Defines the root path route ("/")

0 commit comments

Comments
 (0)