Sha256: d035fbef8563fd7d7fb58ecb8eba8faa03deaddd047a4c62ea6b6d991ccf7037

Contents?: true

Size: 825 Bytes

Versions: 10

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Verifications
    module Sms
      # This is an engine that authorizes users by sending them a code through an SMS.
      class Engine < ::Rails::Engine
        isolate_namespace Decidim::Verifications::Sms

        paths["db/migrate"] = nil
        paths["lib/tasks"] = nil

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

          root to: "authorizations#new"
        end

        initializer "decidim.sms_verification_workflow" do |_app|
          if Decidim.sms_gateway_service
            Decidim::Verifications.register_workflow(:sms) do |workflow|
              workflow.engine = Decidim::Verifications::Sms::Engine
            end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-verifications-0.21.0 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.20.1 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.20.0 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.19.1 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.18.1 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.19.0 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.17.2 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.18.0 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.17.1 lib/decidim/verifications/sms/engine.rb
decidim-verifications-0.17.0 lib/decidim/verifications/sms/engine.rb