Created
July 20, 2016 19:24
-
-
Save chrisnicola/f34a7cd80bfd3aa9b3d696bcd9b35d03 to your computer and use it in GitHub Desktop.
Revisions
-
chrisnicola created this gist
Jul 20, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ require 'auto_reloader' module RailsAutoReloader def self.activate AutoReloader.activate reloadable_paths: ['lib'] end class Middleware def initialize(app) @app = app end def call(env) AutoReloader.reload! do @app.call(env) end end end module Console def ar!(print=true) puts "Reloading AutoReloader..." if print AutoReloader.reload!(onchange: false) reload!(print) end end end