Permalink
Browse files

Only insert metal middleware if any exist

  • Loading branch information...
1 parent ae3a93a commit 82334a74311a3e0a8a1454d0a4a2ebf3c1138cea @josh josh committed Jan 21, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 railties/lib/initializer.rb
@@ -542,7 +542,9 @@ def initialize_i18n
end
def initialize_metal
- configuration.middleware.insert_before(:"ActionController::RewindableInput", Rails::Rack::Metal)
+ configuration.middleware.insert_before(
+ :"ActionController::RewindableInput",
+ Rails::Rack::Metal, :if => Rails::Rack::Metal.metals.any?)
end
# Initializes framework-specific settings for each of the loaded frameworks

0 comments on commit 82334a7

Please sign in to comment.