diff --git a/CHANGELOG.md b/CHANGELOG.md index a6a457f1..242f3538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ Main (3.0.0.alpha) * [#323](https://github.com/rails/sdoc/pull/323) Update favicon [@jonathanhefner](https://github.com/jonathanhefner) * [#345](https://github.com/rails/sdoc/pull/345) Version explicit links to `api.rubyonrails.org` [@jonathanhefner](https://github.com/jonathanhefner) * [#356](https://github.com/rails/sdoc/pull/356) Redesign "Constants" section [@jonathanhefner](https://github.com/jonathanhefner) +* [#357](https://github.com/rails/sdoc/pull/357) Support permalinking constants [@jonathanhefner](https://github.com/jonathanhefner) 2.6.1 ===== diff --git a/lib/rdoc/generator/template/rails/_context.rhtml b/lib/rdoc/generator/template/rails/_context.rhtml index b0412dd2..cc0dc73c 100644 --- a/lib/rdoc/generator/template/rails/_context.rhtml +++ b/lib/rdoc/generator/template/rails/_context.rhtml @@ -58,9 +58,11 @@ <% unless constants.empty? %>

Constants

<% constants.each do |constant| %> -
-
+
+ <%= description_for constant %>
@@ -97,10 +99,10 @@

<%= visibility.to_s.capitalize %> <%= type %> methods

<% methods.each do |method| %>
-
+ <% unless method.aliases.empty? %> diff --git a/lib/rdoc/generator/template/rails/_module_nav.rhtml b/lib/rdoc/generator/template/rails/_module_nav.rhtml index df6b063d..dc4aee9d 100644 --- a/lib/rdoc/generator/template/rails/_module_nav.rhtml +++ b/lib/rdoc/generator/template/rails/_module_nav.rhtml @@ -10,6 +10,15 @@
<% end %> +<% unless (constants = @context.constants).empty? %> + + +<% end %> + <% unless (methods = module_methods(@context)).empty? %>