diff --git a/middleman-core/lib/middleman-core/core_extensions/request.rb b/middleman-core/lib/middleman-core/core_extensions/request.rb index a8bc3a36..9735f5cc 100644 --- a/middleman-core/lib/middleman-core/core_extensions/request.rb +++ b/middleman-core/lib/middleman-core/core_extensions/request.rb @@ -136,7 +136,7 @@ module Middleman def server(&block) @@servercounter ||= 0 @@servercounter += 1 - const_set("MiddlemanApplication#{@@servercounter}", Class.new(Middleman::Application)) + const_set("MiddlemanApplication#{@@servercounter}", Class.new(Middleman::Application, &block)) end end @@ -148,7 +148,7 @@ module Middleman # # @return [Class] def server(&block) - ::Middleman::Application.server + ::Middleman::Application.server(&block) end end