views:

123

answers:

1

Hi guys,

I was wondering how can I specify the method to send the data from a Formtastic form. It usually uses POST, but I'd like it to use GET in some cases (i.e. for a search form).

Is it possible/easy?

+2  A: 

You can specify the :method in the semantic_form_for tag, for a normal form_for tag it would look something like this:

<% form_for :post, @post, :url => post_path(@post), :html => { :method => :get } do |f| %>

I'm pretty sure it works the same for Formtastic forms.

Janteh
You are right!Thank you!
lobo_tuerto