aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_exceptions.rb5
-rw-r--r--railties/lib/rails/generators/rails/app/templates/gitignore7
2 files changed, 5 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
index 1dc51d62e0..6705e531cb 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -16,10 +16,9 @@ module ActionDispatch
def call(env)
begin
- response = @app.call(env)
+ response = (_, headers, body = @app.call(env))
- if response[1]['X-Cascade'] == 'pass'
- body = response[2]
+ if headers['X-Cascade'] == 'pass'
body.close if body.respond_to?(:close)
raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
end
diff --git a/railties/lib/rails/generators/rails/app/templates/gitignore b/railties/lib/rails/generators/rails/app/templates/gitignore
index 090799d5a0..52abb32479 100644
--- a/railties/lib/rails/generators/rails/app/templates/gitignore
+++ b/railties/lib/rails/generators/rails/app/templates/gitignore
@@ -4,14 +4,13 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
-# Ignore bundler related files
+# Ignore bundler config
/.bundle
-/bin
-# Ignore the default SQLite database
+# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
-# Ignore all logfiles and tempfiles
+# Ignore all logfiles and tempfiles.
/log/*.log
/tmp