Sha256: eb8cd7a39d93a1338c7ec2128fdba7d43186be511f869c392d3d51a5786d0608

Contents?: true

Size: 743 Bytes

Versions: 56

Compression:

Stored size: 743 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Surveys
    module SurveyHelper
      def no_permission
        render(
          partial: "decidim/authorization_modals/content"
        )
      end

      def resource
        questionnaire_for
      end

      def current_component
        @current_component ||= Decidim::Component.find(params[:component_id])
      end

      def authorization_action
        @authorization_action ||= params[:authorization_action]
      end

      def authorize_action_path(handler_name)
        authorizations.status_for(handler_name).current_path
      end

      def authorizations
        @authorizations ||= action_authorized_to(:answer, resource: questionnaire_for)
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
decidim-surveys-0.27.9 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.8 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.7 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.6 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.10 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.9 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.5 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.8 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.4 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.3 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.7 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.5 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.2 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.1 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.4 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.0 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.3 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.0.rc2 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.27.0.rc1 app/helpers/decidim/surveys/survey_helper.rb
decidim-surveys-0.26.2 app/helpers/decidim/surveys/survey_helper.rb