Permalink
Browse files

Merge pull request #99 from koraktor/man-route

Added route for /man/*
  • Loading branch information...
schacon committed May 11, 2012
2 parents 8999cd8 + 55e6a5e commit 95d21703a839fc24f9fc5f36ce6a8eab258d0893
Showing with 5 additions and 2 deletions.
  1. +5 −2 config/routes.rb
View
@@ -22,8 +22,11 @@
match "/test" => "doc#test"
match "/doc/ext" => "doc#ext"
- match "/ref/:file" => "doc#man"
- match "/ref/:file/:version" => "doc#man", :version => /[^\/]+/
+ %w{man ref}.each do |path|
+ match "/#{path}/:file" => redirect("/docs/%{file}")
+ match "/#{path}/:file/:version" => redirect("/docs/%{file}/%{version}"),
+ :version => /[^\/]+/
+ end
match "/book" => "doc#book"
match "/book/index" => "doc#book"

0 comments on commit 95d2170

Please sign in to comment.