Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Formtasticフォームからデータを送信する方法をどのように指定できるのでしょうか。通常はPOSTを使用しますが、場合によってはGETを使用したいと思います(つまり、検索フォームの場合)。
それは可能/簡単ですか?
タグで:methodを指定できます。semantic_form_for通常のform_forタグの場合、次のようになります。
semantic_form_for
<% form_for :post, @post, :url => post_path(@post), :html => { :method => :get } do |f| %>
Formtasticフォームでも同じように機能すると確信しています。