lib/servel/home_app.rb in servel-0.9.0 vs lib/servel/home_app.rb in servel-0.10.0
- old
+ new
@@ -1,12 +1,12 @@
class Servel::HomeApp
+ FAVICON_PATH = "/favicon.ico"
+
def initialize(roots)
@roots = roots
end
def call(env)
- @haml_context ||= Servel::HamlContext.new
- body = @haml_context.render('home.haml', { roots: @roots })
-
- [200, {}, [body]]
+ return [404, {}, []] if env["PATH_INFO"] == FAVICON_PATH
+ Servel::HamlContext.render('home.haml', { roots: @roots })
end
end
\ No newline at end of file