Class: Bh::Engine

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

Overview

Hooks the gem into a host app: serves the built stylesheet and script, and the helpers.

Constant Summary collapse

PREFIX =

Where the built files answer from: one prefix of the gem's own, so a host already serving /css from somewhere else keeps it. The slash is kept, since Rack::Static matches on start_with? and /bh would swallow a host's own /bhutan.

'/bh/'.freeze
HEADERS =

Neither URL carries a version, so both are asked for again on every full load and answered 304 Not Modified while the file they name still stands.

[[:all, { 'cache-control' => 'no-cache' }]].freeze