aboutsummaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
authorre4k <re4k@re4k.info>2013-03-23 19:22:25 +0900
committerre4k <re4k@re4k.info>2013-03-23 19:22:25 +0900
commit80eca202c9ae3b3a6098c1654a530b1cd46326cf (patch)
treefca38131a5cd9acefa24cd50fc00870099d2d787 /config/routes.rb
parent773d8610cda565a0bd395f16d94bbda912273237 (diff)
downloadaclog-80eca202c9ae3b3a6098c1654a530b1cd46326cf.tar.gz
refactor
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb37
1 files changed, 25 insertions, 12 deletions
diff --git a/config/routes.rb b/config/routes.rb
index a7b879f..66a28c7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -4,18 +4,31 @@ Aclog::Application.routes.draw do
:screen_name => /[a-zA-Z0-9_]{1,20}/,
:page => /[0-9]+/,
}
+ get "/404" => "errors#error_404"
+ get "/500" => "errors#error_500"
root :to => "main#index"
- get "i/callback" => "sessions#callback"
- get "i/logout" => "sessions#destroy"
-
- get "i/:id" => "i#show", :constraints => constraints
- get ":screen_name/status(es)/:id" => "i#show", :constraints => constraints
-
- get ":screen_name(/:page)" => "users#best", :constraints => constraints
- get ":screen_name/my(/:page)" => "users#my", :constraints => constraints
- get ":screen_name/discovered(/:page)" => "users#my", :constraints => constraints
- get ":screen_name/timeline(/:page)" => "users#timeline", :constraints => constraints
- get ":screen_name/recent(/:page)" => "users#recent", :constraints => constraints
- get ":screen_name/info(/:page)" => "users#info", :constraints => constraints
+
+ get "/i/callback" => "sessions#callback"
+ get "/i/logout" => "sessions#destroy"
+
+ get "/i/best" => "i#best"
+ get "/i/recent" => "i#recent"
+
+ get "/i/:id" => "users#show", :constraints => constraints
+ get "/(users)/:screen_name/status(es)/:id" => redirect("/i/%{id}")
+
+ get "/:screen_name(/:page)" => "users#best", :constraints => constraints
+ get "/:screen_name/best" => redirect("/%{screen_name}")
+ get "/users/:screen_name" => redirect("/%{screen_name}")
+
+ get "/:screen_name/discovered(/:page)" => "users#my", :constraints => constraints
+ get "/:screen_name/my(/:page)" => "users#my", :constraints => constraints
+ get "/users/:screen_name/discovered" => redirect("/%{screen_name}/discovered")
+
+ get "/:screen_name/timeline(/:page)" => "users#timeline", :constraints => constraints
+ get "/:screen_name/timeline/all(/:page)" => "users#timeline", :constraints => constraints, :defaults => {:tweets => "all"}
+ get "/users/:screen_name/recent" => redirect("/%{screen_name}/timeline")
+
+ get "/:screen_name/recent(/:page)" => "users#recent", :constraints => constraints
end