Class: Xray::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/xray/engine.rb

Overview

This is the main point of integration with Rails. This engine hooks into Sprockets and monkey patches ActionView in order to augment the app’s JS and HTML templates with filepath information that can be used by xray.js in the browser. It also hooks in a middleware responsible for injecting xray.js and the xray bar into the app’s response bodies.

Instance Method Summary collapse

Instance Method Details

#ensure_asset_pipeline_enabled!(app) ⇒ Object



116
117
118
119
120
121
122
# File 'lib/xray/engine.rb', line 116

def ensure_asset_pipeline_enabled!(app)
  unless app.assets
    raise "xray-rails requires the Rails asset pipeline.
The asset pipeline is currently disabled in this application.
Either convert your application to use the asset pipeline, or remove xray-rails from your Gemfile."
  end
end