Skip to content

Instantly share code, notes, and snippets.

@sixfeetover
Created March 8, 2010 23:44
Show Gist options
  • Save sixfeetover/325946 to your computer and use it in GitHub Desktop.
Save sixfeetover/325946 to your computer and use it in GitHub Desktop.
# 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