Sha256: 62a34dc52eb681d15a810a52a7fc37516d4ff620b94abdb8d53b8de4026f5037

Contents?: true

Size: 597 Bytes

Versions: 41

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

module Auther
  # The main engine.
  class Engine < ::Rails::Engine
    isolate_namespace Auther

    config.auther_settings = {}
    config.action_view.field_error_proc = proc { |html_tag, _| html_tag.html_safe }

    config.to_prepare do
      Dir.glob(Engine.root + "app/presenters/**/*.rb").each do |presenter|
        require_dependency presenter
      end
    end

    initializer "auther.initialize" do |app|
      app.config.app_middleware.use Gatekeeper, app.config.auther_settings
      app.config.filter_parameters += %i[login password]
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
auther-8.0.0 lib/auther/engine.rb