lib/spire/router.rb in spire-0.4.0 vs lib/spire/router.rb in spire-0.4.1
- old
+ new
@@ -43,10 +43,14 @@
end
def return_file(file)
result = Public.new :file => file, :render => true
file = result.extension_check
- return Response.new(file[:file], file[:content_type], 200)
+ if file == 404
+ return Error.new :status => 404, :message => "404 // File not found"
+ else
+ return Response.new(file[:file], file[:content_type], 200)
+ end
end
def run
require "#{$base_path}/controllers/#{@app["controller"]}Controller"
@class = Kernel.const_get(@app["controller"]).new()