Enable Rack::LiveReload via environment variable RAKE_LIVE_RELOAD.

This commit is contained in:
Martin Edenhofer 2018-09-04 16:54:38 +02:00
parent 5bfa535b62
commit 15d8cb213d

View file

@ -31,8 +31,9 @@ Rails.application.configure do
#config.assets.debug = true #config.assets.debug = true
config.assets.debug = false config.assets.debug = false
if defined?(Rack::LiveReload)
# Automatically inject JavaScript needed for LiveReload # Automatically inject JavaScript needed for LiveReload
if ENV['RAKE_LIVE_RELOAD'].present?
require 'rack-livereload'
config.middleware.insert_after( config.middleware.insert_after(
ActionDispatch::Static, ActionDispatch::Static,
Rack::LiveReload, Rack::LiveReload,