ElMassimo / js_from_routes

🛣️ Generate path helpers and API methods from your Rails routes
https://js-from-routes.netlify.app/
MIT License
100 stars 7 forks source link

Allow usage of Rails relative_url_root configuration #40

Open eliasfroehner opened 10 months ago

eliasfroehner commented 10 months ago

Description 📖

This pull request implements the ability to use the relative_url_root configuration of Rails.

Background 📜

Sometimes it is necessary to host multiple Rails applications on a single host without subdomains. Therefore you need to use the relative_url_root configuration to set the prefix for the specific Rails application. For example

The fix 🔨

js_from_routes now supports the _relative_url_root configuration. It set the relative_url_root configuration of Rails by default, but could be overridden.