Skip to content

Commit

Permalink
Merge pull request #250 from jonathanhefner/skip-lt-if-nil-superclass
Browse files Browse the repository at this point in the history
Skip rendering parent class when superclass is nil
  • Loading branch information
jonathanhefner authored Jul 23, 2023
2 parents 3474888 + 3f7b41c commit 1e05940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rdoc/generator/template/rails/class.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
<h2>
<span class="type"><%= klass.module? ? 'Module' : 'Class' %></span>
<%= h klass.full_name %>
<% if klass.type == 'class' %>
<% if klass.type == "class" && klass.superclass %>
<span class="parent">&lt;
<% if klass.superclass.is_a?(String) %>
<%= klass.superclass %>
<% elsif klass.superclass %>
<% else %>
<%= link_to klass.superclass.full_name, klass.superclass %>
<% end %>
</span>
Expand Down

0 comments on commit 1e05940

Please sign in to comment.