Sha256: 7c6dbe90ee68270586fe781df7f8c81f5d8e65acb286098b38880dd1d46f0a1a

Contents?: true

Size: 581 Bytes

Versions: 27

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Initiatives
    # Exposes the initiative type text search so users can choose a type writing its name.
    class InitiativesTypeScopesController < Decidim::Initiatives::ApplicationController
      helper_method :scoped_types

      # GET /initiative_type_scopes/search
      def search
        enforce_permission_to :search, :initiative_type_scope
        render layout: false
      end

      private

      def scoped_types
        @scoped_types ||= InitiativesType.find(params[:type_id]).scopes
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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