Sha256: 231093d4ef8da006d60bd8ac165e8dacb5df37d90ea93e03cda7d3a5c046089d

Contents?: true

Size: 693 Bytes

Versions: 51

Compression:

Stored size: 693 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Consultations
    class AuthorizationVoteModalsController < Decidim::Consultations::ApplicationController
      include NeedsQuestion

      helper_method :authorizations, :authorize_action_path
      layout false

      def show
        render template: "decidim/authorization_modals/show"
      end

      private

      def authorize_action_path(handler_name)
        authorizations.status_for(handler_name).current_path(redirect_url: URI(request.referer).path)
      end

      def authorizations
        @authorizations ||= action_authorized_to(:vote, resource: nil, permissions_holder: current_question)
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
decidim-consultations-0.23.3 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.23.2 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.23.1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.23.1.rc1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.23.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.22.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.21.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.20.1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.20.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.19.1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.19.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb