Thanks to @ghostrigger
This commit is contained in:
Toks 2013-05-11 13:41:32 -04:00
parent 6c5c2ee65c
commit 7c795c61e6

View File

@ -289,7 +289,10 @@ Danbooru::Application.routes.draw do
match "/post/view/:id" => redirect("/posts/%{id}")
match "/post/flag/:id" => redirect("/posts/%{id}")
match "/post_tag_history" => redirect {|params, req| "/post_versions?page=#{req.params[:page]}"}
match("/post_tag_history" => redirect do |params, req|
page = req.params[:before_id].present? ? "b#{req.params[:before_id]}" : req.params[:page]
"/post_versions?page=#{page}&search[updater_id]=#{req.params[:user_id]}"
end)
match "/post_tag_history/index" => redirect {|params, req| "/post_versions?page=#{req.params[:page]}"}
match "/tag/index.xml", :controller => "legacy", :action => "tags", :format => "xml"