TL;DR; I first tried to generate and copy the attachment files via a rake task but there are - to the best of my present knowledge - quite a few hoops to jump through to get the right final URL so that it matches what the markup expects, so much so that I think it's extremely error prone. The other option I explored was for parklife to merely collect more URLs and - maybe - get and save those files, which I ended up doing in Utils#scan_for_links
The code is simple enough but I'm unsure what scenarios exist that might hamper this approach, so I though I would open a PR just the same as that makes discussion easier .. maybe :)
A small follow up to https://github.com/benpickles/parklife/issues/102 where I was trying to figure out the best strategy to include
ActiveStorage
attachments into the static build.TL;DR; I first tried to generate and copy the attachment files via a rake task but there are - to the best of my present knowledge - quite a few hoops to jump through to get the right final URL so that it matches what the markup expects, so much so that I think it's extremely error prone. The other option I explored was for
parklife
to merely collect more URLs and - maybe - get and save those files, which I ended up doing inUtils#scan_for_links
The code is simple enough but I'm unsure what scenarios exist that might hamper this approach, so I though I would open a PR just the same as that makes discussion easier .. maybe :)