Sha256: 127d59a7fe731b3833d4b87eb7f7087a5d218deb32956ab581bb5b8acd1ece1c

Contents?: true

Size: 555 Bytes

Versions: 4

Compression:

Stored size: 555 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::ApplicationController
      helper_method :scoped_types

      # GET /initiative_type_scopes/search
      def search
        authorize! :search, InitiativesTypeScope
        render layout: false
      end

      private

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-initiatives-0.11.2 app/controllers/decidim/initiatives/initiatives_type_scopes_controller.rb
decidim-initiatives-0.11.1 app/controllers/decidim/initiatives/initiatives_type_scopes_controller.rb
decidim-initiatives-0.11.0.pre1 app/controllers/decidim/initiatives/initiatives_type_scopes_controller.rb
decidim-initiatives-0.9.1 app/controllers/decidim/initiatives/initiatives_type_scopes_controller.rb