aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/railties
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-21 16:50:11 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-21 16:52:49 +0100
commitfc4f237864541f5012f9b8cc8e0ec81960377e55 (patch)
treeaf89be8dd26fe96044d4b9114f1cea1a4e6910cc /actionpack/lib/action_controller/railties
parent04063393f9392b83cf5ccd0a16f217cc7261e15c (diff)
downloadrails-fc4f237864541f5012f9b8cc8e0ec81960377e55.tar.gz
rails-fc4f237864541f5012f9b8cc8e0ec81960377e55.tar.bz2
rails-fc4f237864541f5012f9b8cc8e0ec81960377e55.zip
Make filter parameters based on request, so they can be modified for anything in the middleware stack.
Diffstat (limited to 'actionpack/lib/action_controller/railties')
-rw-r--r--actionpack/lib/action_controller/railties/subscriber.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/railties/subscriber.rb b/actionpack/lib/action_controller/railties/subscriber.rb
index d257d6ac2c..1f0e6bf51a 100644
--- a/actionpack/lib/action_controller/railties/subscriber.rb
+++ b/actionpack/lib/action_controller/railties/subscriber.rb
@@ -1,10 +1,14 @@
module ActionController
module Railties
class Subscriber < Rails::Subscriber
+ INTERNAL_PARAMS = %w(controller action format _method only_path)
+
def start_processing(event)
payload = event.payload
+ params = payload[:params].except(*INTERNAL_PARAMS)
+
info " Processing by #{payload[:controller]}##{payload[:action]} as #{payload[:formats].first.to_s.upcase}"
- info " Parameters: #{payload[:params].inspect}" unless payload[:params].blank?
+ info " Parameters: #{params.inspect}" unless params.empty?
end
def process_action(event)