I have a form that doesn\'t have a model associated with it, so I\'m using form_tag
rather than form_for
. As expected, when the user submits the form
You can use fields_for inside a form_tag
for a more formal way of expressing a namespace.
fields_for :form_fields do |ff|
ff.text_field :my_text_field
ff.select :my_select_tag
end
Alternatively just namespace all your form inputs, as such:
text_field_tag "form_fields[my_text_field]"
select_tag "form_fields[my_select_tag]" ...
etc. Then you will get params[:form_fields] = {:my_text_field => "foo", :my_select_tag => "bar"}
, which I think is what you wanted.