使用simple_form 2.0.4,我可以:
= simple_form_for(@thing) do |f|
它产生:
<form accept-charset="UTF-8" action="/things/37" class="simple_form" id="edit_thing_37" method="post" novalidate="novalidate">
但是我需要:
<form accept-charset="UTF-8" action="/things/37?foo=bar" class="simple_form" id="edit_thing_37" method="post" novalidate="novalidate">
这该怎么做?
谢谢!
最佳答案
你可以写
= simple_form_for(@thing, :url => thing_path(@thing, :foo => 'bar')) do |f|