-
Notifications
You must be signed in to change notification settings - Fork 22.2k
Closed
Description
Hi,
I think I found a regression/bug in Rails 7.1
Context
We, at Avo use one main engine but also have a few smaller ones alongside it to bring new features.
The issue consists in the fact that URLs that are generated and displayed in the initial, parent engine (avo), for the second engine do not contain the mount path of the first one.
What happens is:
avoengine gets mounted on/avoproengine gets mounted in theavoengine on/pro- the expectation is that any route we call on the
proengine should be generated with the/avoprefix
*That is the way it worked on 7.0
Steps to reproduce
https://gist.github.com/adrianthedev/ab57557950a05804532377b69185d866
The script should be executed with the RAILS_VERSON env variable like so:
# run with rails 7.0.8.3 (last 7.0 version) and see the tests pass
RAILS_VERSION=7.0.8.3 ruby repro.rb
# run with rails 7.1 and see the tests fail
RAILS_VERSION=7.1.0 ruby repro.rbExpected behavior
The generated URL should contain the /avo prefix in both 7.0 and 7.1.
Actual behavior
The generated URL does not contain the /avo prefix in Rails 7.1.
System configuration
Rails version: 7.0 and 7.1
Ruby version: 3.3.1