Merge branch 'master' into dashboard

This commit is contained in:
decabeza
2019-03-26 16:45:48 +01:00
2476 changed files with 62613 additions and 84405 deletions

View File

@@ -1,9 +1,11 @@
class PollsController < ApplicationController
include PollsHelper
before_action :load_active_poll, only: :index
load_and_authorize_resource
has_filters %w{current expired incoming}
has_filters %w[current expired]
has_orders %w{most_voted newest oldest}, only: :show
::Poll::Answer # trigger autoload
@@ -34,4 +36,10 @@ class PollsController < ApplicationController
def results
end
private
def load_active_poll
@active_poll = ActivePoll.first
end
end