Created
March 8, 2010 23:44
-
-
Save sixfeetover/325946 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# Development mode reloading | |
class Sinatra::Reloader < Rack::Reloader | |
def safe_load(file, mtime, stderr = $stderr) | |
if file == __FILE__ | |
::Sinatra::Application.reset! | |
stderr.puts "#{self.class}: reseting routes" | |
end | |
super | |
end | |
end | |
configure :development do | |
use Sinatra::Reloader | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment