Routes for new resources

Does anyone know what the controller code would look like for a route
like this:

resources :reports do
new do
post :preview
end
end

and a helper that looks like this:

preview_new_report_path

thanks for response

actually, let me rephrase this. That route points to the preview
action of a reports controller, but why is it a POST for a new
resource?

Hey John, Haven’t you defined it as a POST in this line?
post :preview

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs