Apipie/apipie-rails

View on GitHub
app/views/apipie/apipies/method.html.erb

Summary

Maintainability
Test Coverage
<ul class='breadcrumb'>
  <li>
    <a href='<%= @doc[:doc_url] %><%= @doc[:link_extension] %>'><%= @doc[:name] %> <%= @resource[:version] %></a>
    <span class='divider'>/</span>
  </li>
  <li>
    <a href='<%= @resource[:doc_url] %><%= @doc[:link_extension] %>'>
      <%= @resource[:name] %>
      <% if @resource[:version] %><% end %>
    </a>
    <span class='divider'>/</span>
  </li>
  <li class='active'><%= @method[:name] %></li>
  <%= render(:partial => "languages", :locals => {:doc_url => @method[:doc_url]}) %>

</ul>

<% @method[:apis].each do |api| %>
  <div class='page-header'>
    <h1>
      <%= api[:http_method] %> <%= api[:api_url] %>
      <% if api[:deprecated] %>
        <code>DEPRECATED</code>
      <% end %>
      <br>
      <small><%= raw api[:short_description] %></small>
    </h1>
  </div>
<% end %>

<div>
  <% unless @method[:see].empty? %>
    Also see <%= @method[:see].map { |s| link_to(s[:description], "#{s[:link]}#{@doc[:link_extension]}") }.to_sentence.html_safe %>.
  <% end %>

  <%= render(:partial => "method_detail", :locals => {:method => @method, :h_level => 2}) %>
</div>

<% unless content_for(:apipie_footer) == @doc[:copyright] %>
  <%= content_for :apipie_footer, raw(@doc[:copyright]) %>
<% end %>