1

Simpleform 似乎将路由名称附加到其参数哈希中。如何防止或消除它?

simple_form_for @profile ... 

返回参数,如:

Parameters: {"utf8"=>"✓", "query"=>"" ...

simple_form_for profile_path

返回参数,如:

 params['people/search][:query] 

我想删除那个人/搜索路径,但无法弄清楚如何以任何方式,任何人都知道如何删除它并仍然使用 simple_form?谢谢!

4

1 回答 1

1

这成功了:

  = simple_form_for  :people,  :url => request.fullpath, :method => :get,  :html => { :class => 'form-search' } do |f|
于 2012-09-01T09:53:49.910 回答