Sha256: 12719242776681591cc3afb95e27cbdf8252e5132ef7efcd414c1f0b2ca02342

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 Bytes

Contents

<% @routes_collection.routes.group_by{ |r| r.controller }.each do |controller, routes| %>
<h2><%= controller.titleize %></h2>
<table>
  <thead>
    <tr>
      <th>Resource</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>       
    <% routes.each do |route|%>     
       <tr>
          <td class="resource">
            <%= link_to route.verb + " " + route.path, route_path(:id => generate_name(route.verb, route.path)) %>
          </td>
          <td>
            <% if file_exists?(route.verb, route.path) %>
              <%= route.description %>
              <%= link_to 'Update', edit_route_path(generate_name(route.verb, route.path))%>
            <% else %>
              <%= link_to 'Create a description', edit_route_path(generate_name(route.verb, route.path))%>
            <% end %>
          </td>
       </tr>
    <% end %>
  </tbody>
</table>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
docushin-0.0.1 app/views/docushin/routes/index.html.erb