我希望能够在提交时添加一个额外的查询字符串参数,该参数classrooms_search_textbox
与用户将键入的值相同。我该怎么做呢?
<%= form_tag classrooms_path, :method => :get, :id => "classrooms_search_form" do %>
<%= text_field_tag "classrooms_search_textbox", "Find a classroom" %>
<%= submit_tag "Find", :id => "classrooms_search_button", :class => "button" %>
我是否需要添加一个hidden_tag
(如果需要,我将如何去做?)或者我可以以classrooms_path
某种方式添加吗?
谢谢!