Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce current in url #1215

Open
JuanitoFatas opened this issue Sep 19, 2022 · 4 comments 路 May be fixed by #1417 or #1426
Open

Introduce current in url #1215

JuanitoFatas opened this issue Sep 19, 2022 · 4 comments 路 May be fixed by #1417 or #1426

Comments

@JuanitoFatas
Copy link
Contributor

JuanitoFatas commented Sep 19, 2022

Hi 馃憢馃徏

I think it would be nice to introduce current in url: https://rubyapi.org/current/o/binding, which pulls content from latest current ruby version: https://rubyapi.org/3.1/o/binding

This idea is inspired by Postgres docs: https://www.postgresql.org/docs/current/ddl-partitioning.html that is same as https://www.postgresql.org/docs/14/ddl-partitioning.html as of 2022-09-19.

CleanShot 2022-09-19 at 09 41 52@2x

Thanks for considerations.

@andyw8
Copy link
Contributor

andyw8 commented Feb 14, 2023

A slightly different approach is for current to redirect to the stable version, which is what ruby-doc.org does. e.g. https://ruby-doc.org/current/Module.html#method-i-ancestors redirects to https://ruby-doc.org/3.2.1/Module.html#method-i-ancestors. I'm unsure which I prefer.

@natematykiewicz
Copy link
Contributor

natematykiewicz commented Feb 14, 2023

Honestly, it's just what we've got flagged as the default version, right?

default: true

Going off of what you said, we make https://rubyapi.org/current/o/string look up the default version, and redirect to https://rubyapi.org/3.2/o/string, right?

@andyw8
Copy link
Contributor

andyw8 commented Feb 14, 2023

Basically, yeah. There might some cases where a class/module is removed/renamed in a newer version of Ruby, so the redirect could be invalid, but I imagine that would be rare.

andyw8 added a commit to andyw8/rubyapi that referenced this issue Feb 22, 2023
andyw8 added a commit to andyw8/rubyapi that referenced this issue Feb 22, 2023
@andyw8 andyw8 linked a pull request Feb 22, 2023 that will close this issue
@andyw8
Copy link
Contributor

andyw8 commented Feb 24, 2023

@natematykiewicz any thoughts on this? #1417

andyw8 added a commit to andyw8/rubyapi that referenced this issue Mar 4, 2023
andyw8 added a commit to andyw8/rubyapi that referenced this issue Mar 4, 2023
@andyw8 andyw8 linked a pull request Mar 4, 2023 that will close this issue
andyw8 added a commit to andyw8/rubyapi that referenced this issue Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants