Sha256: f6729200c8c3e114536be26d208528aff827cbe7fe02c3d85f8cd8b238d5d199

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

module Decidim
  module DirectVerifications
    module Verification
      class AdminEngine < ::Rails::Engine
        isolate_namespace Decidim::DirectVerifications::Verification::Admin
        paths["db/migrate"] = nil

        routes do
          resources :direct_verifications, only: [:index, :create, :stats]
          resources :stats, only: [:index]
          resources :authorizations, only: [:index, :destroy]
          resources :imports, only: [:new, :create]
          resources :user_authorizations, only: [:show, :update, :destroy]

          root to: "direct_verifications#index"
        end

        config.after_initialize do
          if Decidim::DirectVerifications.participants_modal.present?
            Decidim::Admin::OfficializationsController.include(Decidim::DirectVerifications::Admin::NeedsVerificationSnippets)
          end
        end

        initializer "direct_verifications.webpacker.assets_path" do
          Decidim.register_assets_path File.expand_path("app/packs", root)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-direct_verifications-1.2.1 lib/decidim/direct_verifications/verification/admin_engine.rb