Class: Xray::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Xray::Engine
- 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
91 92 93 94 95 96 97 |
# File 'lib/xray/engine.rb', line 91 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 xrail-rails from your Gemfile." end end |