Skip to content

Instantly share code, notes, and snippets.

@JuanVqz
Last active April 13, 2026 19:19
Show Gist options
  • Select an option

  • Save JuanVqz/b812fe50ccef26cb1d62839056c95fcb to your computer and use it in GitHub Desktop.

Select an option

Save JuanVqz/b812fe50ccef26cb1d62839056c95fcb to your computer and use it in GitHub Desktop.
PWA en Rails - Demo 1: App Instalable | RubySur 2026

PWA en Rails - Demo 1: App Instalable

Charla "PWA en Rails" - RubySur - 13 de abril de 2026 Video: https://www.youtube.com/watch?v=ppxalpIKpGg

Solo con un Web App Manifest, las rutas y los meta tags, tu app Rails ya es instalable.

Archivos

  • manifest.json.erbapp/views/pwa/manifest.json.erb
  • routes.rb → agregar 2 lineas en config/routes.rb
  • _head.html.erb → agregar 1 linea en el <head> del layout

Repo

<%# app/views/layouts/_head.html.erb — agregar en el <head>: %>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<%= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
{
"name": "May Store",
"short_name": "MayStore",
"icons": [
{
"src": "/icon.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/icon.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "maskable"
}
],
"start_url": "/",
"display": "standalone",
"scope": "/",
"description": "MayStore.",
"theme_color": "red",
"background_color": "red"
}
# PWA en Rails - Demo 1 | RubySur - 13/04/2026
# config/routes.rb — agregar estas 2 líneas:
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment