I think that this should be easy, but the solution escapes me. I am
using submit_to_remote and need to access the form parameters in the
controller.
In my view I have this as a sample so that I can generate the parameters
and see the hash.
<%= submit_to_remote 'Update Div', 'update', :url => {:action => 'do' }
%>
Then the parameters that are returned include the form variables in this
format:
This works the same as it would if you had simply submitted the form
in the usual manner rather than
via remote, you can access them through the params hash. So you can
simply say something like
if params[:name] == "spammer"
error_code = "OH NOES!!!! SPAMMERS!.
end
Can I take this one step further to insert these values into the db?
The way that this works is a user starts to fill out a form and then
needs to open up a pop-up window to choose more values. The problem
that I ran in to is that if it's a new order, then there's no order id
to associate with the pop-up window values so I want to capture what's
already been completed on the form, insert that, and use the new record
id value with the pop-up value.
Is there an elegant way to loop through the order values without naming
each key and value pair?