Open mjc-gh opened 2 years ago
@mjc-gh thanks for opening this issue and for linking to your patched version. I haven't given much thought to Rails 7 support yet so I'm happy to hear that you have already considered the path forward. ✨
If you have the energy I would appreciate you proposing your simple file discovery approach in a PR. If we can also make that backwards compatible with older versions of Rails, that would be ideal. Right now this gem is still backwards compatible as far as Rails 3, which is probably something else I should revisit, now that Rails 3 is getting long in the tooth. We have integration tests for Rails 3, 4, 5 and 6. We'll need to add Rails 7 to that list.
@jamesmartin sounds good! I also think I am incorrect in that asset pipeline/sprockets is not being removed entirely. I can look more into the underlying changes with Rails 7 and see what the best approach is moving forward.
I also think I am incorrect in that asset pipeline/sprockets is not being removed entirely. I can look more into the underlying changes with Rails 7 and see what the best approach is moving forward.
@mjc-gh interesting, thanks for the additional context.
Would you mind taking look at a PR that was recently opened (https://github.com/jamesmartin/inline_svg/pull/134) that seems to be tackling the same problem your patch solves, in a slightly different way? If this approach would work for you, then we might be safe to merge that and continue forward.
Just curious how you envision Rails 7 will be supported since asset pipeline is being removed. For the time being, I've fixed the gem for my company's use with the following commit: https://github.com/mjc-gh/inline_svg/commit/f271f16de85864d9071139f850ae097bb415e3d7
Happy to update add more configuration for setting the asset path. Could possibly add a simple file discovery approach where several paths could be searched for the file and first one found is used. Let me know what you think and I can put together a proper Rails 7 support.