Hi,
I am making a survey app.
The user takes the survey and I’m saving it fine.
But what i want next is to redirect the user to /surveys/1/results
after completion.
I have tried the following in my routes file:
Rails.application.routes.draw do
resources :surveys do
match ‘results’ => ‘results#index’
end
resources :survey_answers
end
And in my controller i tried:
redirect_to survey_results_path(@survey)
but im getting:
No route matches {:controller=>“results”}
Any help?