Skip to content

Commit 6b39b72

Browse files
committed
ruby script to generate the routes based on the rails PR.
stevegraham/rails#1
1 parent 0e48840 commit 6b39b72

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gen_routes.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env ruby
2+
arr = ["foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply"]
3+
paths = arr.permutation(3).map { |a| "/#{a.join '/'}" }
4+
paths.each do |path|
5+
puts "rtree_insert_path(n, \"#{path}\", NULL);"
6+
end

0 commit comments

Comments
 (0)