Sha256: 4f1fba065f325b1cb105ee9d77e96dd0b51ee875b2a8cd6c3214f02a311cc528

Contents?: true

Size: 511 Bytes

Versions: 6

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Initiatives
    module Admin
      # A command with all the business logic that creates a new initiative type scope
      class CreateInitiativeTypeScope < Decidim::Commands::CreateResource
        protected

        fetch_form_attributes :supports_required, :decidim_scopes_id

        def attributes = super.merge(decidim_initiatives_types_id: form.context.type_id)

        def resource_class = Decidim::InitiativesTypeScope
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-initiatives-0.29.1 app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb
decidim-initiatives-0.29.0 app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb
decidim-initiatives-0.29.0.rc4 app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb
decidim-initiatives-0.29.0.rc3 app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb
decidim-initiatives-0.29.0.rc2 app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb
decidim-initiatives-0.29.0.rc1 app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb