Fallback to RAILS_RELATIVE_URL_ROOT in url_for#18775
Closed
yasyf wants to merge 1 commit intorails:masterfrom
Closed
Fallback to RAILS_RELATIVE_URL_ROOT in url_for#18775yasyf wants to merge 1 commit intorails:masterfrom
url_for#18775yasyf wants to merge 1 commit intorails:masterfrom
Conversation
Contributor
Author
|
Just a note that I consulted with @pixeltrix before deciding on the order of precedence with these different prefix options. |
Member
There was a problem hiding this comment.
New tests should use the Ruby 1.9 hash syntax instead of hash rockets.
Contributor
Author
|
@eileencodes fixed. |
Member
There was a problem hiding this comment.
I'm not sure if we should be coupling Action Dispatch with Action Controller here. Do we have any precedent? cc @pixeltrix
Can we inject this config at load time using the railtie?
Contributor
Author
There was a problem hiding this comment.
I can change this to use railties.
Contributor
Author
|
@rafaelfranca I added a new config for Action Dispatch to prevent coupling it with Action Controller. |
Fixed an issue where the `RAILS_RELATIVE_URL_ROOT` environment variable is not prepended to the path when `url_for` is called. If `SCRIPT_NAME` (used by Rack) is set, it takes precedence.
rafaelfranca
added a commit
that referenced
this pull request
Mar 3, 2015
Fallback to RAILS_RELATIVE_URL_ROOT in `url_for`
Member
|
Merged at 44ff031 |
rafaelfranca
added a commit
that referenced
this pull request
Mar 3, 2015
Fallback to RAILS_RELATIVE_URL_ROOT in `url_for`
Member
|
Backported at 0703453 |
jiannis
pushed a commit
to moneyadviceservice/publify
that referenced
this pull request
May 10, 2016
This reverts commit 2d9514e which has been fixed since Rails 4.2.3 See: - [Rails 4.2.3 Changelog](https://github.com/rails/rails/blob/v4.2.4/actionpack/CHANGELOG.md#rails-423-june-25-2015) - [Fallback to RAILS_RELATIVE_URL_ROOT in `url_for` #18775](rails/rails#18775)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed an issue where the
RAILS_RELATIVE_URL_ROOTenvironmentvariable is not prepended to the path when
url_foris called.If
SCRIPT_NAME(used by Rack) is set, it takes precedence.Fixes #5122.