lib/bolt/serve.rb in benofsky-bolt-0.4 vs lib/bolt/serve.rb in benofsky-bolt-0.4.1
- old
+ new
@@ -67,11 +67,12 @@
# overrides the standard page method used in these pages to instead send us
# the block used to generate the page, so basically @pages is full of
# url => block references.
load_pages
parse_config
-
- page = @pages[request['GET'].gsub(/\.html/,'')[1..-1]]
+
+ page_name = request['GET'].gsub(/\.html/,'')[1..-1]
+ page = @pages[page_name]
if(!page.nil?)
@server.reply(page.call)
elsif(File.exists?(d($config.resources) + request['GET']))
f = File.new(d($config.resources) + request['GET'])
\ No newline at end of file