No-Model Formtastic Form
Posted
by Kevin Sylvestre
on Stack Overflow
See other posts from Stack Overflow
or by Kevin Sylvestre
Published on 2010-04-08T17:43:15Z
Indexed on
2010/04/08
22:33 UTC
Read the original article
Hit count: 552
ruby-on-rails
|formtastic
I am looking to reproduce the following with Formtastic:
<% form_tag '/search', :method => 'get' do %>
<%= text_field_tag :q, params[:q] %>
<% end %>
So far I have:
<% semantic_form_for :search, :html => { :method => :get } do |form| %>
<% form.inputs do %>
<%= form.input :q %>
<% end %>
<% end %>
However, this requires access to the parameter hash using:
params[:search][:q]
Instead of my required:
params[:q]
I'd like to use Formtastic for all forms in the application I am working on, and so far I have only had problems with this one. Any ideas?
© Stack Overflow or respective owner