views:

43

answers:

1

G'day guys, I have a current set of data, and I generate multiple analyses of this data (each analysis into its own active record item called a pricing_interval) using a helper function at the moment.

Currently to analyse the set of data, you need a start time(using datetime_select) an integer (using text_field) and a name (using text_field)

I would like on submission of the form to be redirected to the index page of my pricing_interval, as the values will be re-generated. Manually generating a range proves that my helper methods work.

How would I build a form that on submit would send parameters to a function in the form of (date,integer,name) so that it could immediately begin work whilst redirecting the user to server/pricing_intervals

Anything at all would help, I've spent hours over the past few days trying to get the rails form syntax working properly to no avail, a really straightforward guide to what I would implement to get this working would be amazingly appreciated.

I've looked through the form guides, as I'm not creating an object, but merely parsing params, there's got to be an easy way to do this, right?

A: 

You can use the rails form helper hidden_field_tag to put in whatever form fields you want. They are added to the params hash that your controller will see. You don't have to only send form fields that correspond to an ActiveRecord model.

fullware