fixes #1578 hopefully

pulls the `query` parameter from url; removes the `user:` prefix. there must be more elegant solution than this.
This commit is contained in:
ghostrigger
2013-05-11 21:52:37 +08:00
parent 3366291ea0
commit 20588a7848

View File

@@ -239,7 +239,7 @@ Danbooru::Application.routes.draw do
match "/comment/index" => redirect {|params, req| "/comments?page=#{req.params[:page]}"}
match "/comment/show/:id" => redirect("/comments/%{id}")
match "/comment/new" => redirect("/comments")
match "/comment/search" => redirect("/comments/search")
match "/comment/search" => redirect {|params, req| "/comments?group_by=comment&search[creator_name]=#{CGI::escape(req.params[:query].to_s).sub!(/^user(%3A|%253A|:)/, '')}"}
match "/favorite" => redirect {|params, req| "/favorites?page=#{req.params[:page]}"}
match "/favorite/index" => redirect {|params, req| "/favorites?page=#{req.params[:page]}"}