aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing
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/routing
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/routing')
-rw-r--r--actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb3
-rw-r--r--actionpack/lib/action_controller/routing/route_set.rb2
2 files changed, 2 insertions, 3 deletions
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={})