aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-01-21 12:37:03 -0600
committerJoshua Peek <josh@joshpeek.com>2009-01-21 12:37:03 -0600
commit82334a74311a3e0a8a1454d0a4a2ebf3c1138cea (patch)
tree1ec6551aa60c209b44789fb89d2979aaa8477037
parentae3a93ad897fa9c481ee16454e9e29fe0a9e3493 (diff)
downloadrails-82334a74311a3e0a8a1454d0a4a2ebf3c1138cea.tar.gz
rails-82334a74311a3e0a8a1454d0a4a2ebf3c1138cea.tar.bz2
rails-82334a74311a3e0a8a1454d0a4a2ebf3c1138cea.zip
Only insert metal middleware if any exist
-rw-r--r--railties/lib/initializer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index f6b8899d58..dd4d483233 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -542,7 +542,9 @@ Run `rake gems:install` to install the missing gems.
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