Files
nairobi/app/controllers/polls_controller.rb
2016-11-03 17:52:15 +01:00

16 lines
297 B
Ruby

class PollsController < ApplicationController
load_and_authorize_resource
has_filters %w{current expired incoming}
def index
@polls = @polls.send(@current_filter).sort_for_list.page(params[:page])
end
def show
@questions = @poll.questions.sort_for_list.for_render
end
end