templates/api/method_details/html/header.erb in yard-api-0.1.4 vs templates/api/method_details/html/header.erb in yard-api-0.1.5
- old
+ new
@@ -2,11 +2,12 @@
<h2 class='api_method_name' name='<%= @method_link %>' data-subtopic='<%= @subtopic %>'>
<a name='<%= @method_link %>' href='#<%= @method_link %>'>
<%= object.tag("API").try(:text) %>
</a>
- <% if @controller_path %>
- <span class='defined-in'><a href="https://github.com/amireh/pibi/blob/master/<%= @controller_path %>"><%= "#{@route.requirements[:controller].camelize}Controller\##{@route.requirements[:action]}" %></a></span>
+ <% if @controller_path && !api_options.github_url.to_s.empty? %>
+ <span class='defined-in'>
+ <a href="<%= api_options.github_url %>/blob/<%= api_options.github_branch %>/<%= @controller_path %>"><%= "#{@route.requirements[:controller].camelize}Controller\##{@route.requirements[:action]}" %></a></span>
<% end %>
</h2>
<%= yieldall %>
</div>