Sha256: e95995e5cb3074b738e46b4fdc9426ff45a90d28e716db96f79bae5e3f7cf20c

Contents?: true

Size: 507 Bytes

Versions: 7

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

7 entries across 7 versions & 1 rubygems

Version Path
quilt_rails-3.5.5 lib/quilt_rails/engine.rb
quilt_rails-3.5.4 lib/quilt_rails/engine.rb
quilt_rails-3.5.2 lib/quilt_rails/engine.rb
quilt_rails-3.5.1 lib/quilt_rails/engine.rb
quilt_rails-3.5.0 lib/quilt_rails/engine.rb
quilt_rails-3.4.2 lib/quilt_rails/engine.rb
quilt_rails-3.4.1 lib/quilt_rails/engine.rb