Sha256: 24bbfd19ede7dd2e0f9e305ade6bc6693bc62869ae666e58b366eb4b603fc121

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

if defined?(Rails) && Rails.version.to_f > 3.1
  class Engine < Rails::Engine
    isolate_namespace Graylog2Rails
    include Graylog2Rails::Initializers

    initializer "graylog2_rails.establish_connection" do |app|
      read_config!
    end

    initializer "graylog2_rails.add_middleware", :after => "graylog2_rails.establish_connection" do |app|
      app.middleware.insert_after ActionDispatch::Head, Graylog2Rails::Middleware, Graylog2Rails.gelf_config_options
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graylog2-rails-0.0.1 lib/graylog2-rails/engine.rb