Sha256: 556e7ed28fe90c37121dbc6250ad3db191ad59f2048f216bc18a6ccf38ba7d7b

Contents?: true

Size: 623 Bytes

Versions: 7

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Consultations
    # A controller that holds the logic to show questions in a
    # public layout.
    class QuestionsController < Decidim::Consultations::ApplicationController
      layout "layouts/decidim/question"

      include NeedsQuestion

      helper Decidim::SanitizeHelper
      helper Decidim::IconHelper
      helper Decidim::Comments::CommentsHelper
      helper Decidim::AttachmentsHelper
      helper Decidim::ResourceReferenceHelper

      def show
        enforce_permission_to :read, :question, question: current_question
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-consultations-0.13.1 app/controllers/decidim/consultations/questions_controller.rb
decidim-consultations-0.12.2 app/controllers/decidim/consultations/questions_controller.rb
decidim-consultations-0.13.0 app/controllers/decidim/consultations/questions_controller.rb
decidim-consultations-0.12.1 app/controllers/decidim/consultations/questions_controller.rb
decidim-consultations-0.13.0.pre1 app/controllers/decidim/consultations/questions_controller.rb
decidim-consultations-0.12.0 app/controllers/decidim/consultations/questions_controller.rb
decidim-consultations-0.12.0.pre app/controllers/decidim/consultations/questions_controller.rb