Sha256: 7858dd4875265f3cef7cefd88a619b13532eb6fa4170fa1ed5c5ae3681e5d1e1

Contents?: true

Size: 473 Bytes

Versions: 6

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    # A command with all the business logic when updating a scope.
    class UpdateScope < Decidim::Commands::UpdateResource
      fetch_form_attributes :name, :code, :scope_type

      protected

      def extra_params
        {
          extra: {
            parent_name: resource.parent.try(:name),
            scope_type_name: resource.scope_type.try(:name)
          }
        }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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