redirection problem, passing variables

Darren Evans wrote:

I have this in my controller:
redirect_to :action => 'edit'
I would like to redirect to 'edit/somenumber' where some number is
@document.id

Does this not work?

        redirect_to :action => 'edit', :id => @document.id

It all depends on your config/routes.rb, where the "id" field is put in the
URL and how it is passed on.