From 8d3adf0308d03f54711ebce638ff1f38138601c8 Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 15 Sep 2018 23:50:13 +0200 Subject: [PATCH] Setting up livereload --- Guardfile | 2 +- config/environments/development.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Guardfile b/Guardfile index b3c1d525..0acf8bed 100644 --- a/Guardfile +++ b/Guardfile @@ -3,7 +3,7 @@ # rubocop:disable all guard :livereload do - watch(%r{app/views/.+\.(erb|haml|slim)$}) + watch(%r{app/views/.+\.(erb|haml|slim)}) watch(%r{app/helpers/.+\.rb}) watch(%r{public/.+\.(css|js|html)}) watch(%r{config/locales/.+\.yml}) diff --git a/config/environments/development.rb b/config/environments/development.rb index 3fe41d30..d22c2572 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -57,4 +57,8 @@ Rails.application.configure do # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + # Add Rack::LiveReload to the bottom of the middleware stack with the default + # options: + config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload end