File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
actionpack/lib/action_dispatch/journey Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -98,24 +98,7 @@ def recognize(req, &block)
98
98
end
99
99
end
100
100
101
- def visualizer
102
- tt = GTG ::Builder . new ( ast ) . transition_table
103
- groups = partitioned_routes . first . map ( &:ast ) . group_by ( &:to_s )
104
- asts = groups . values . map ( &:first )
105
- tt . visualizer ( asts )
106
- end
107
-
108
101
private
109
- def partitioned_routes
110
- routes . partition { |r |
111
- r . path . anchored && r . path . requirements_anchored?
112
- }
113
- end
114
-
115
- def ast
116
- routes . ast
117
- end
118
-
119
102
def simulator
120
103
routes . simulator
121
104
end
@@ -125,7 +108,6 @@ def custom_routes
125
108
end
126
109
127
110
def filter_routes ( path )
128
- return [ ] unless ast
129
111
simulator . memos ( path ) { [ ] }
130
112
end
131
113
Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ def add_route(name, mapping)
72
72
route
73
73
end
74
74
75
+ def visualizer
76
+ tt = GTG ::Builder . new ( ast ) . transition_table
77
+ groups = anchored_routes . map ( &:ast ) . group_by ( &:to_s )
78
+ asts = groups . values . map ( &:first )
79
+ tt . visualizer ( asts )
80
+ end
81
+
75
82
private
76
83
def clear_cache!
77
84
@ast = nil
You can’t perform that action at this time.
0 commit comments