[groonga-commit:1784] ranguba/ranguba [master] use env["PATH_INFO"] isntead of literal "/search"

null+ranguba at clear-code.com null+ranguba at clear-code.com
Thu Oct 28 23:51:43 EDT 2010


SHIMODA Hiroshi	2010-10-29 03:51:43 +0000 (Fri, 29 Oct 2010)

  New Revision: fdd08aa2f3fac17dbd559942cb382821bd642052

  Log:
    use env["PATH_INFO"] isntead of literal "/search"

  Modified files:
    app/controllers/search_controller.rb

  Modified: app/controllers/search_controller.rb (+2 -1)
===================================================================
--- app/controllers/search_controller.rb    2010-10-29 03:43:09 +0000 (ad1c187)
+++ app/controllers/search_controller.rb    2010-10-29 03:51:43 +0000 (09dd881)
@@ -3,7 +3,8 @@ class SearchController < ApplicationController
   def index
     unless params[:search_request].is_a?(String)
       path = SearchRequest.new(params[:search_request]).to_s
-      redirect_to "/search/#{path}"
+      base = request.env["PATH_INFO"]
+      redirect_to "#{base}/#{path}"
       return
     end
 



More information about the groonga-commit mailing list