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.26.1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.26.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.26.0.rc2 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.26.0.rc1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.25.2 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.25.1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.25.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.25.0.rc4 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.25.0.rc3 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.25.0.rc2 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.25.0.rc1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.24.3 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.23.6 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.24.2 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.23.5 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.24.1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.24.0 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.24.0.rc2 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.23.4 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb
decidim-consultations-0.24.0.rc1 app/controllers/decidim/consultations/authorization_vote_modals_controller.rb