Rails 3 UTF-8 query string showing up in URL?

前端 未结 4 787
你的背包
你的背包 2020-11-30 07:37

I have a search query form on my home page (/)

<% form_tag(search_path, :method => :get) do %>
  <%= text_field_tag \'query\' %>
  <%= subm         


        
4条回答
  •  甜味超标
    2020-11-30 07:47

    This parameter is a new feature of rails 3.

    It was previously the snowman.

    It helps IE to really use utf-8.

    Avoid using form_tag and it works:

    <%= text_field_tag 'query' %> <%= submit_tag "Search", :name => nil%>

提交回复
热议问题