Skip to content
Browse files

Fixing Rails::Server#app under Rack::URLMap

  • Loading branch information...
1 parent 72cca79 commit 8496be7e119aee0e3e0edc877a3fe3998b797d29 @guilleiguaran guilleiguaran committed
Showing with 5 additions and 1 deletion.
  1. +4 −0 railties/lib/rails/application.rb
  2. +1 −1 railties/lib/rails/commands/server.rb
View
4 railties/lib/rails/application.rb
@@ -138,6 +138,10 @@ def config
@config ||= Application::Configuration.new(find_root_with_flag("config.ru", Dir.pwd))
end
+ def to_app
+ self
+ end
+
protected
alias :build_middleware_stack :app
View
2 railties/lib/rails/commands/server.rb
@@ -43,7 +43,7 @@ def initialize(*)
end
def app
- @app ||= super.instance
+ @app ||= super.respond_to?(:to_app) ? super.to_app : super
end
def opt_parser

0 comments on commit 8496be7

Please sign in to comment.
Something went wrong with that request. Please try again.