aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-06 15:38:05 -0700
committerXavier Noria <fxn@hashref.com>2010-04-06 15:38:05 -0700
commit4c4fd1a60ff1c060e76e9ee540074756510f53ea (patch)
tree77da1c66c127e36c8b00825b676d9267a9ef4cd6 /railties/lib/rails/application.rb
parent03cb74b9461293b96ae0add8ff5efda132dabba0 (diff)
parentaf130575249571464ec984efa84fcea1267e8cf8 (diff)
downloadrails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.tar.gz
rails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.tar.bz2
rails-4c4fd1a60ff1c060e76e9ee540074756510f53ea.zip
Merge commit 'rails/master'
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r--railties/lib/rails/application.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 0084309ea4..38a5aa8ca3 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -1,3 +1,4 @@
+require 'active_support/core_ext/hash/reverse_merge'
require 'fileutils'
require 'rails/plugin'
require 'rails/engine'
@@ -128,8 +129,14 @@ module Rails
end
def call(env)
- env["action_dispatch.parameter_filter"] = config.filter_parameters
- app.call(env)
+ app.call(env.reverse_merge!(env_defaults))
+ end
+
+ def env_defaults
+ @env_defaults ||= {
+ "action_dispatch.parameter_filter" => config.filter_parameters,
+ "action_dispatch.secret_token" => config.secret_token
+ }
end
def initializers