Fix engine path resolution - #113
Conversation
|
@pcoliveira is there anything I can do to help this PR along? This has been nagging me for a long while and finally has become more of an issue |
| end | ||
| end | ||
| raise "No route matched for #{request.request_method} #{request.path_info}" | ||
| nil |
There was a problem hiding this comment.
Q) Why this error message is removed?
There was a problem hiding this comment.
When two engines are mounted on the same root path, and the first doesn't resolve, the resolution needs to continue to the next engine. The raise was moved to the caller, when all engines are resolved
|
My organization recently ran into the issue fixed by this PR, so I would love to see this released ❤️ |
|
@pcoliveira Hi. Sorry for late response. |
sorry, I missed your question. |
…ne-path-resolution # Conflicts: # spec/rails/doc/openapi.yaml
Codecov Report
@@ Coverage Diff @@
## master #113 +/- ##
==========================================
+ Coverage 96.65% 96.91% +0.25%
==========================================
Files 14 14
Lines 419 421 +2
==========================================
+ Hits 405 408 +3
+ Misses 14 13 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@exoego How may I help? is there anything I need to do to move the PR forward? |
exoego
left a comment
There was a problem hiding this comment.
LGTM
This is amazing.
Sorry for the late response.
Closes issue #56
BREAKING CHANGE: The returned path for mounted engines now includes the path prefix.
An error was raised when testing a route that is mounted after an engine that shares the same route prefix.
The path returned for a mounted engine didn't include the route prefix (only the engine sub path was returned).
On the engine test case, the expected path was changed from
/eng_routeto/my_engine/eng_route, to match the mounted path.