Sha256: 548d5fb7575902499eb710dc84bbf3c92d98ceb8a564f9fd4028b94f45eb3e37

Contents?: true

Size: 780 Bytes

Versions: 8

Compression:

Stored size: 780 Bytes

Contents

module DeviseOtpAuthenticatable
  class Engine < ::Rails::Engine

    ActiveSupport.on_load(:action_controller) do
      include DeviseOtpAuthenticatable::Controllers::UrlHelpers
      include DeviseOtpAuthenticatable::Controllers::Helpers
    end
    ActiveSupport.on_load(:action_view) do
      include DeviseOtpAuthenticatable::Controllers::UrlHelpers
      include DeviseOtpAuthenticatable::Controllers::Helpers
    end

    # We use to_prepare instead of after_initialize here because Devise is a Rails engine;
    config.to_prepare do
      DeviseOtpAuthenticatable::Hooks.apply
    end

    # extend mapping with after_initialize because is not reloaded
    config.after_initialize do
      Devise::Mapping.send :include, DeviseOtpAuthenticatable::Mapping
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
devise-otp2-0.2.6 lib/devise_otp_authenticatable/engine.rb
devise-otp2-0.2.5 lib/devise_otp_authenticatable/engine.rb
devise-otp2-0.2.4 lib/devise_otp_authenticatable/engine.rb
devise-otp-rails5-0.2.4 lib/devise_otp_authenticatable/engine.rb
devise-otp-0.2.3 lib/devise_otp_authenticatable/engine.rb
devise-otp-0.2.2 lib/devise_otp_authenticatable/engine.rb
devise-otp-0.2.0 lib/devise_otp_authenticatable/engine.rb
devise-otp-0.1.1 lib/devise_otp_authenticatable/engine.rb