-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version explicit links to api.rubyonrails.org
#345
Merged
jonathanhefner
merged 1 commit into
rails:main
from
jonathanhefner:version-rubyonrails-links
Nov 14, 2023
Merged
Version explicit links to api.rubyonrails.org
#345
jonathanhefner
merged 1 commit into
rails:main
from
jonathanhefner:version-rubyonrails-links
Nov 14, 2023
Conversation
This file contains 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
Similar to ffcaf81, this uses postprocessing to version explicit links to api.rubyonrails.org. For example, if `ENV["HORO_PROJECT_VERSION"]` is "3.2.1" (and `ENV["HORO_PROJECT_NAME"]` is "Ruby on Rails"), then ```html <a href="https://api.rubyonrails.org/classes/ActiveRecord/Base.html">Learn more</a> ``` will be changed to ```html <a href="https://api.rubyonrails.org/v3.2.1/classes/ActiveRecord/Base.html">Learn more</a> ``` This allows such URLs to be used in `README.rdoc` files instead of using `link:classes/ActiveRecord/Base.html`, which is not properly resolved when the link is rendered on e.g. GitHub.
46930b8
to
87683a1
Compare
jonathanhefner
added a commit
to jonathanhefner/rails
that referenced
this pull request
Nov 14, 2023
Prior to this commit, `link:classes/...` URLs were used in `README.rdoc` files so that the URLs would be versioned when rendered at api.rubyonrails.org. However, outside of api.rubyonrails.org, such URLs aren't properly resolved. Since rails/sdoc#345, `https://api.rubyonrails.org/classes/...` URLs will also be versioned when rendered at api.rubyonrails.org, and such URLs properly resolve everywhere. Therefore, this commit converts `link:classes/...` URLs to that form.
jonathanhefner
added a commit
to jonathanhefner/rails
that referenced
this pull request
Nov 14, 2023
Follow-up to rails#49995. Prior to this commit, `link:classes/...` URLs were used in `README.rdoc` files so that the URLs would be versioned when rendered at api.rubyonrails.org. However, outside of api.rubyonrails.org, such URLs aren't properly resolved. Since rails/sdoc#345, `https://api.rubyonrails.org/classes/...` URLs will also be versioned when rendered at api.rubyonrails.org, and such URLs are properly resolved everywhere. Therefore, this commit converts `link:classes/...` URLs to that form.
This was referenced Nov 14, 2023
jonathanhefner
added a commit
to jonathanhefner/sdoc
that referenced
this pull request
Dec 24, 2023
Follow-up to 87683a1. This adds a CHANGELOG entry, plus a minor code cleanup.
jonathanhefner
added a commit
to jonathanhefner/sdoc
that referenced
this pull request
Dec 24, 2023
Follow-up to 87683a1. This adds a CHANGELOG entry, plus a minor code cleanup.
jonathanhefner
added a commit
to jonathanhefner/sdoc
that referenced
this pull request
Dec 24, 2023
Follow-up to 87683a1. This adds a CHANGELOG entry, plus a minor code cleanup.
jonathanhefner
added a commit
that referenced
this pull request
Dec 24, 2023
Add CHANGELOG entry for #345
yoones
pushed a commit
to yoones/rails
that referenced
this pull request
Mar 6, 2025
Follow-up to rails#49995. Prior to this commit, `link:classes/...` URLs were used in `README.rdoc` files so that the URLs would be versioned when rendered at api.rubyonrails.org. However, outside of api.rubyonrails.org, such URLs aren't properly resolved. Since rails/sdoc#345, `https://api.rubyonrails.org/classes/...` URLs will also be versioned when rendered at api.rubyonrails.org, and such URLs are properly resolved everywhere. Therefore, this commit converts `link:classes/...` URLs to that form.
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.
Similar to ffcaf81, this uses postprocessing to version explicit links to api.rubyonrails.org. For example, if
ENV["HORO_PROJECT_VERSION"]
is "3.2.1" (andENV["HORO_PROJECT_NAME"]
is "Ruby on Rails"), thenwill be changed to
This allows such URLs to be used in
README.rdoc
files instead of usinglink:classes/ActiveRecord/Base.html
, which is not properly resolved when the link is rendered on e.g. GitHub.