Commit a1fdcb3
Consider relative URL root configuration
When Rails is deployed to a subdirectory per [the official guide instructions](https://guides.rubyonrails.org/configuring.html#deploy-to-a-subdirectory-relative-url-root), JSON:API should take this into account.
Implementation detail: Switched from string concatenation (`+`) to string interpolation because `Rails.application.config.relative_url_root` might be `nil`, which would cause an error as @hlogmans [already stated](https://github.com/cerebris/jsonapi-resources/issues/473#issuecomment-153719383).
Tested with:
- Setting `RAILS_RELATIVE_URL_ROOT=/subdirectory`
- Adding `config.relative_url_root = '/subdirectory'` in application.rb or <environment>.rb
Fixes #4731 parent 1041e34 commit a1fdcb3
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
0 commit comments