Rails: Rewrite get variables in URL to cleaner style
I am trying to figure out how to submit a search query get variables as /search/query instead of /search?search=query. An开发者_StackOverflow社区y ideas?
Define route in your routes.rb
map.search "/search/:search", :controller => "search", :action => "index", :conditions => { :method => :get }
restart server and check.
for more info ref Module ActionController::Routing
精彩评论