Sha256: 6a0f674e71386e0282f5eb8ca6856fefc424c9d9d5a70a4a1de753b3cd2b6d33

Contents?: true

Size: 933 Bytes

Versions: 5

Compression:

Stored size: 933 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module AccessRequests
    module Verification
      # This is an engine that performs user authorization.
      class Engine < ::Rails::Engine
        isolate_namespace Decidim::AccessRequests::Verification
        paths["db/migrate"] = nil

        routes do
          resource :authorizations, only: [:new, :create, :edit], as: :authorization

          root to: "authorizations#new"
        end

        initializer "decidim_access_requests.assets" do |app|
          app.config.assets.precompile += %w(decidim_access_requests_manifest.css
                                             decidim/access_requests/verification.scss)
        end

        def load_seed
          # Enable the `:access_requests` authorization
          org = Decidim::Organization.first
          org.available_authorizations << :access_requests
          org.save!
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-access_requests-0.19.1 lib/decidim/access_requests/verification/engine.rb
decidim-access_requests-0.19.0 lib/decidim/access_requests/verification/engine.rb
decidim-access_requests-0.18.0 lib/decidim/access_requests/verification/engine.rb
decidim-access_requests-0.17.0 lib/decidim/access_requests/verification/engine.rb
decidim-access_requests-0.16.1 lib/decidim/access_requests/verification/engine.rb