extracts results from admin's poll/show
This commit is contained in:
13
app/controllers/admin/poll/results_controller.rb
Normal file
13
app/controllers/admin/poll/results_controller.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class Admin::Poll::ResultsController < Admin::BaseController
|
||||
before_action :load_poll
|
||||
|
||||
def index
|
||||
@partial_results = @poll.partial_results
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_poll
|
||||
@poll = ::Poll.includes(:questions).find(params[:poll_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user