Creating a specialised view filtering form in Rails
Posted
by Schroedinger
on Stack Overflow
See other posts from Stack Overflow
or by Schroedinger
Published on 2010-04-24T09:25:42Z
Indexed on
2010/04/24
9:33 UTC
Read the original article
Hit count: 489
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?
© Stack Overflow or respective owner