我的搜索表格:
<%= form_tag("/search/index/", :method => "get") do %>
<%= text_field_tag :search, params[:search], :name => 'q' %>
<% end %>
我的搜索控制器:
class SearchController < ApplicationController
def index
@query = params[:q]
end
end
当前网址:http://localhost:3000/search/index/?utf8=✓3&q=
我想要的是http://localhost:3000/search?q=
或至少与此类似的东西