Forum: Ruby on Rails validating embedded form parameters

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ara V. (Guest)
on 2006-06-03 18:10
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
Ara V. (Guest)
on 2006-06-04 00:59
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 => ???}
This topic is locked and can not be replied to.