railstar 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/railstar/general_controller.rb +4 -1
- data/app/views/layouts/railstar/application.html.erb +4 -3
- data/app/views/railstar/general/routes.html.erb +25 -0
- data/config/routes.rb +1 -1
- data/lib/generators/railstar/install/install_generator.rb +1 -1
- data/lib/railstar/version.rb +1 -1
- data/test/dummy/log/development.log +7584 -0
- metadata +9 -11
- data/app/views/railstar/general/code.html.erb +0 -83
- data/test/dummy/tmp/pids/server.pid +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require 'rails/source_annotation_extractor'
|
|
1
2
|
module Railstar
|
|
2
3
|
class GeneralController < ApplicationController
|
|
3
4
|
layout "railstar/application"
|
|
@@ -13,7 +14,9 @@ module Railstar
|
|
|
13
14
|
@cols = %w(name human_name sql_type klass default type null)
|
|
14
15
|
end
|
|
15
16
|
|
|
16
|
-
def
|
|
17
|
+
def routes
|
|
18
|
+
Rails.application.reload_routes!
|
|
19
|
+
@routes = Rails.application.routes.routes
|
|
17
20
|
end
|
|
18
21
|
end
|
|
19
22
|
end
|
|
@@ -35,11 +35,12 @@
|
|
|
35
35
|
<span class="icon-bar"></span>
|
|
36
36
|
<span class="icon-bar"></span>
|
|
37
37
|
</a>
|
|
38
|
-
<%= link_to Railstar.env["product_name"], root_path, :class => "brand" %>
|
|
38
|
+
<%= link_to Railstar.env["product_name"], main_app.root_path, :class => "brand" %>
|
|
39
39
|
<div class="nav-collapse">
|
|
40
40
|
<ul class="nav">
|
|
41
|
-
<li
|
|
42
|
-
<li
|
|
41
|
+
<li><%= link_to "Top", root_path %></li>
|
|
42
|
+
<li><%= link_to "Database", database_path %></li>
|
|
43
|
+
<li><%= link_to "Routes", routes_path, {} %></li>
|
|
43
44
|
</ul>
|
|
44
45
|
</div><!--/.nav-collapse -->
|
|
45
46
|
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="container">
|
|
2
|
+
<div>
|
|
3
|
+
<table class="table table-bordered table-condensed">
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th>name</th>
|
|
7
|
+
<th>method</th>
|
|
8
|
+
<th>path</th>
|
|
9
|
+
<th>app</th>
|
|
10
|
+
</tr>
|
|
11
|
+
</thead>
|
|
12
|
+
<tbody>
|
|
13
|
+
<% name = nil %>
|
|
14
|
+
<% @routes.each do |route| %>
|
|
15
|
+
<tr>
|
|
16
|
+
<td><%= name = route.name || name %></td>
|
|
17
|
+
<td><%= route.constraints[:request_method].inspect.gsub(/(nil)|[\/^$]/,"") %></td>
|
|
18
|
+
<td><%= route.path.spec %></td>
|
|
19
|
+
<td><%= route.defaults %></td>
|
|
20
|
+
</tr>
|
|
21
|
+
<% end %>
|
|
22
|
+
</tbody>
|
|
23
|
+
</table>
|
|
24
|
+
</div><!--/span-->
|
|
25
|
+
</div><!--/.fluid-container-->
|
data/config/routes.rb
CHANGED
data/lib/railstar/version.rb
CHANGED