app/views/docushin/routes/index.html.erb in docushin-0.0.1 vs app/views/docushin/routes/index.html.erb in docushin-0.0.2

- old
+ new

@@ -1,25 +1,25 @@ -<% @routes_collection.routes.group_by{ |r| r.controller }.each do |controller, routes| %> -<h2><%= controller.titleize %></h2> +<h3>Application Routes</h3> +<% @route_set.routes.group_by{ |r| r.controller }.each do |controller, routes| %> <table> <thead> <tr> - <th>Resource</th> + <th><%= controller.titleize.gsub("/", "::") %></th> <th>Description</th> </tr> </thead> - <tbody> - <% routes.each do |route|%> + <tbody> + <% routes.each do |route|%> <tr> <td class="resource"> - <%= link_to route.verb + " " + route.path, route_path(:id => generate_name(route.verb, route.path)) %> + <%= 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))%> + <%= link_to 'Update', edit_route_path(generate_name(route.verb, route.path)) if is_in_dev?%> <% else %> - <%= link_to 'Create a description', edit_route_path(generate_name(route.verb, route.path))%> + <%= link_to 'Create a description', edit_route_path(generate_name(route.verb, route.path)) if is_in_dev?%> <% end %> </td> </tr> <% end %> </tbody>