We're going to add some constraints in the routes file, and if we add a `resolve` clause inside a constraints block, we get an error saying that "The resolve method can't be used inside a routes scope block" when starting the application.
11 lines
281 B
Ruby
11 lines
281 B
Ruby
resources :polls, only: [:show, :index] do
|
|
member do
|
|
get :stats
|
|
get :results
|
|
end
|
|
|
|
resources :questions, controller: "polls/questions", shallow: true, only: [] do
|
|
resources :answers, controller: "polls/answers", only: [:create, :destroy], shallow: false
|
|
end
|
|
end
|