Sha256: 9a373521e2952b75af02c850c783de5bfc1e673fa968ac647b0ca28a87d75492
Contents?: true
Size: 555 Bytes
Versions: 18
Compression:
Stored size: 555 Bytes
Contents
module Effective class PollsController < ApplicationController before_action(:authenticate_user!) if defined?(Devise) def show poll = Effective::Poll.find(params[:id]) EffectiveResources.authorize!(self, :show, poll) ballot = Effective::Ballot.where(poll: poll, user: current_user).first if ballot.present? redirect_to effective_polls.poll_ballot_build_path(poll, ballot, ballot.next_step) else redirect_to effective_polls.poll_ballot_build_path(poll, :new, :start) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems