Validating embedded form parameters


#1

For controller action filters, I cannot seem to find the syntax for
validating nested request parameters. For example, let’s say I had an
input field named “person[name]”

verify :only => :create,
:params => :person,
:redirect_to => {:action => ‘new’}

What is the syntax for verifying the name property? I have tried out
every possibility I can think of, and nothing seems to work


#2

Similarly, how do you access variables on the right side of your
parameter hash? For example, if you were redirecting from an update to
an edit page, it would be very useful to send the user back to the same
model object ID.

verify :only => :update,
:params => :body,
:redirect_to => {:action => ‘edit’, :id => ???}