loading...

re: Your first Progressive Web App on Rails VIEW POST

FULL DISCUSSION
 

Hey Ross, awesome gem. Was trying to play around with it and currently stuck on adding an icon to manifest.json.erb. What's the best way of adding in the src of the image? I tried using <%= asset_path %> but it doesn't quite work, at least not in development. Currently trying to "Add to homescreen" in development via DevTools -> Application -> Manifest.

Here's manifest.json.erb:

{
  "name": "blahblah",
  "short_name": "blahblahblah",
  "icons": [
    {
      "src": "",
      "sizes": "192x192",
      "type": "image/png"
    }
  ],
  "start_url": "/"
}

Again, not sure what to fill in for "src".

 

Does image_path work? Check out how I'm using it in my sample app here.

 

Awesome! Thanks for the quick reply. Working so far :)

code of conduct - report abuse