Sha256: 1a4e1e55836944869a5eacf34de6935e9fdec2bc3625ca861ccbaf75c792e850

Contents?: true

Size: 507 Bytes

Versions: 2

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module Quilt
  class Engine < ::Rails::Engine
    isolate_namespace Quilt

    config.quilt = Quilt.configuration

    initializer(:initialize_quilt_logger, after: :initialize_logger) do
      config.quilt.logger = ::Rails.logger
    end

    initializer(:mount_quilt, before: :add_builtin_route) do |app|
      if config.quilt.mount?
        app.routes.append do
          mount(Quilt::Engine, at: "/") unless has_named_route?(:quilt)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
quilt_rails-3.6.0 lib/quilt_rails/engine.rb
quilt_rails-3.5.6 lib/quilt_rails/engine.rb