Class: Radar::Integration::Rails3

Inherits:
Object
  • Object
show all
Defined in:
lib/radar/integration/rails3.rb

Overview

Allows drop-in integration with Rails 3 for Radar. This basically enables a middleware in your Rails 3 application which catches any exceptions and adds some additional information to the exception (such as the rack environment, request URL, etc.)

Class Method Summary collapse

Class Method Details

.integrate!(app) ⇒ Object

Raises:

  • (ArgumentError)


9
10
11
12
13
14
# File 'lib/radar/integration/rails3.rb', line 9

def self.integrate!(app)
  raise ArgumentError.new("Rails integration requires a Rails application to be defined.") if !Rails.application

  # For now just use the Rack::Radar
  Rails.application.config.middleware.use "Rack::Radar", :application => app
end