Sha256: 0cee6972bd8644815c85683e6a2763627497341738c2bb21c444760ff89949a0

Contents?: true

Size: 383 Bytes

Versions: 2

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

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

    config.quilt = Quilt.configuration

    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.4.0 lib/quilt_rails/engine.rb
quilt_rails-3.3.1 lib/quilt_rails/engine.rb