Merge branch 'master' into dashboard
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user