diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/rack.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/rack/metal.rb | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/railties/lib/rails/rack.rb b/railties/lib/rails/rack.rb index 90535674e9..f721abddc8 100644 --- a/railties/lib/rails/rack.rb +++ b/railties/lib/rails/rack.rb @@ -2,6 +2,7 @@ module Rails module Rack autoload :Debugger, "rails/rack/debugger" autoload :Logger, "rails/rack/logger" + autoload :Metal, "rails/rack/metal" autoload :Static, "rails/rack/static" end end diff --git a/railties/lib/rails/rack/metal.rb b/railties/lib/rails/rack/metal.rb new file mode 100644 index 0000000000..8dfbedad90 --- /dev/null +++ b/railties/lib/rails/rack/metal.rb @@ -0,0 +1,21 @@ +module Rails + module Rack + class Metal + NotFound = lambda { |env| + [404, {"Content-Type" => "text/html"}, "Not Found"] + } + + def self.call(env) + new(NotFound).call(env) + end + + def initialize(app) + @app = app + end + + def call(env) + @app.call(env) + end + end + end +end |