aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-07-01 12:55:19 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-07-01 12:55:19 -0700
commite7312105c73c20b286ebf17b16808001803e2c61 (patch)
tree3e23282353ffa6e6fc1ca53afc2e0b35f51a6274 /actionpack/lib/action_controller
parent54f48517708d16e92bfc6bab6255f6299ca80af0 (diff)
parent1026d7706ffb467eac3cee8142d964bc2d30baa8 (diff)
downloadrails-e7312105c73c20b286ebf17b16808001803e2c61.tar.gz
rails-e7312105c73c20b286ebf17b16808001803e2c61.tar.bz2
rails-e7312105c73c20b286ebf17b16808001803e2c61.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/base/filter_parameter_logging.rb4
-rw-r--r--actionpack/lib/action_controller/base/http.rb2
-rw-r--r--actionpack/lib/action_controller/base/streaming.rb2
-rw-r--r--actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb3
-rw-r--r--actionpack/lib/action_controller/routing/route_set.rb2
-rw-r--r--actionpack/lib/action_controller/testing/performance_test.rb (renamed from actionpack/lib/action_controller/testing/performance.rb)0
6 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/base/filter_parameter_logging.rb b/actionpack/lib/action_controller/base/filter_parameter_logging.rb
index 26cd03f277..065e62a37f 100644
--- a/actionpack/lib/action_controller/base/filter_parameter_logging.rb
+++ b/actionpack/lib/action_controller/base/filter_parameter_logging.rb
@@ -43,6 +43,10 @@ module ActionController
filtered_parameters[key] = '[FILTERED]'
elsif value.is_a?(Hash)
filtered_parameters[key] = filter_parameters(value)
+ elsif value.is_a?(Array)
+ filtered_parameters[key] = value.collect do |item|
+ filter_parameters(item)
+ end
elsif block_given?
key = key.dup
value = value.dup if value
diff --git a/actionpack/lib/action_controller/base/http.rb b/actionpack/lib/action_controller/base/http.rb
index 2e73561f93..ec78bc15a8 100644
--- a/actionpack/lib/action_controller/base/http.rb
+++ b/actionpack/lib/action_controller/base/http.rb
@@ -36,7 +36,7 @@ module ActionController
# ==== Returns
# String
def self.controller_path
- @controller_path ||= self.name.sub(/Controller$/, '').underscore
+ @controller_path ||= name && name.sub(/Controller$/, '').underscore
end
# Delegates to the class' #controller_path
diff --git a/actionpack/lib/action_controller/base/streaming.rb b/actionpack/lib/action_controller/base/streaming.rb
index 70a97ccfec..9ff4f25f43 100644
--- a/actionpack/lib/action_controller/base/streaming.rb
+++ b/actionpack/lib/action_controller/base/streaming.rb
@@ -168,7 +168,7 @@ module ActionController #:nodoc:
end
headers.merge!(
- 'Content-Length' => options[:length],
+ 'Content-Length' => options[:length].to_s,
'Content-Disposition' => disposition,
'Content-Transfer-Encoding' => 'binary'
)
diff --git a/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb b/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb
index d9b614c237..c6f7de17bd 100644
--- a/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb
+++ b/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb
@@ -112,8 +112,7 @@ module ActionController
# Returns the path component of a URL for the given record. It uses
# <tt>polymorphic_url</tt> with <tt>:routing_type => :path</tt>.
def polymorphic_path(record_or_hash_or_array, options = {})
- options[:routing_type] = :path
- polymorphic_url(record_or_hash_or_array, options)
+ polymorphic_url(record_or_hash_or_array, options.merge(:routing_type => :path))
end
%w(edit new).each do |action|
diff --git a/actionpack/lib/action_controller/routing/route_set.rb b/actionpack/lib/action_controller/routing/route_set.rb
index 45ad8a3a3b..87b4b0571c 100644
--- a/actionpack/lib/action_controller/routing/route_set.rb
+++ b/actionpack/lib/action_controller/routing/route_set.rb
@@ -436,7 +436,7 @@ module ActionController
def recognize(request)
params = recognize_path(request.path, extract_request_environment(request))
request.path_parameters = params.with_indifferent_access
- "#{params[:controller].camelize}Controller".constantize
+ "#{params[:controller].to_s.camelize}Controller".constantize
end
def recognize_path(path, environment={})
diff --git a/actionpack/lib/action_controller/testing/performance.rb b/actionpack/lib/action_controller/testing/performance_test.rb
index d88180087d..d88180087d 100644
--- a/actionpack/lib/action_controller/testing/performance.rb
+++ b/actionpack/lib/action_controller/testing/performance_test.rb