Controllers and models to see the polls stats. Routes related also added.

This commit is contained in:
iagirre
2017-10-16 17:25:04 +02:00
parent 7af18ff77a
commit 78cc09cc5a
6 changed files with 114 additions and 0 deletions

View File

@@ -112,6 +112,8 @@ Rails.application.routes.draw do
get :search, on: :collection
end
get "polls/:id/stats", to: "polls/stats#show", as: 'custom_poll_stats'
resources :polls, only: [:show, :index] do
resources :questions, controller: 'polls/questions', shallow: true do
post :answer, on: :member