class Rails::Application

def reload_routes!

def reload_routes!
  _routes = self.routes
  _routes.disable_clear_and_finalize = true
  _routes.clear!
  routes_reloader.paths.each { |path| load(path) }
  ActiveSupport.on_load(:action_controller) { _routes.finalize! }
ensure
  _routes.disable_clear_and_finalize = false
end