Skip to content

Add HTML fragment references for constants #1016

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

Closed
wants to merge 1 commit into from

Conversation

p8
Copy link
Contributor

@p8 p8 commented Jun 2, 2023

In large libraries with a lot of constants (Rails for example), it would be nice to deep link to these constants.

In large libraries with a lot of constants (Rails for example), it would
be nice to deep link to these constants.
@nobu
Copy link
Member

nobu commented Jul 5, 2023

Where and for what do you expect these are used?
RDoc adds constant's names as ids now, e.g., https://docs.ruby-lang.org/en/master/RDoc.html#ATTR_MODIFIERS

@p8
Copy link
Contributor Author

p8 commented Jul 5, 2023

It would be nice if we could deeplink to the following constants in the Rails API docs:
image
https://api.rubyonrails.org/classes/ActionDispatch/Http/Cache/Response.html

It helps when trying to communicate the values of these constants with others.
For example I could share the DATE constant here:
https://api.rubyonrails.org/classes/ActionDispatch/Http/Cache/Response.html#constant-ActionDispatch::Http::Cache::Response::DATE

@nobu
Copy link
Member

nobu commented Jul 6, 2023

https://api.rubyonrails.org/classes/ActionDispatch/Http/Cache/Response.html

Is that page generated with RDoc?

@p8
Copy link
Contributor Author

p8 commented Jul 6, 2023

Yes. It uses https://github.com/rails/sdoc which is built on top of RDoc.

@nobu
Copy link
Member

nobu commented Jul 16, 2023

It seems a role of views.
Shouldn't it be done in template files?

@nobu
Copy link
Member

nobu commented Jul 16, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants