Sha256: b009f4c24e262079760b631da35d26bb2f3e3bc0cd7b56cd9e15785df649187c

Contents?: true

Size: 584 Bytes

Versions: 7

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module AccessRequests
    module Verification
      module DetectableVerificationManifest
        include ActiveSupport::Concern

        def verification_manifest
          if verification_manifest_handle
            Decidim::Verifications.workflows.to_a.find do |verification|
              verification.name == verification_manifest_handle
            end
          end
        end

        def verification_manifest_handle
          request.path.split("/")[2] if request.path =~ %r{^/admin/}
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-access_requests-0.19.1 app/controllers/concerns/decidim/access_requests/verification/detectable_verification_manifest.rb
decidim-access_requests-0.19.0 app/controllers/concerns/decidim/access_requests/verification/detectable_verification_manifest.rb
decidim-access_requests-0.18.0 app/controllers/concerns/decidim/access_requests/verification/detectable_verification_manifest.rb
decidim-access_requests-0.17.0 app/controllers/concerns/decidim/access_requests/verification/detectable_verification_manifest.rb
decidim-access_requests-0.16.1 app/controllers/concerns/decidim/access_requests/verification/detectable_verification_manifest.rb
decidim-access_requests-0.16.0 app/controllers/concerns/decidim/access_requests/verification/detectable_verification_manifest.rb
decidim-access_requests-0.15.0 app/controllers/concerns/decidim/access_requests/verification/detectable_verification_manifest.rb