From 21cd4c0e93fc6ac5497ada787d286c07f627e5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=3D=3Futf-8=3Fq=3FMislav=3D20Marohni=3DC4=3D87=3F=3D?= Date: Sun, 21 Jun 2009 17:53:07 +0100 Subject: Fix polymorphic_path doesn't modify options hash [#2099 state:resolved] Signed-off-by: Pratik Naik --- .../lib/action_controller/routing/generation/polymorphic_routes.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller') 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 # polymorphic_url with :routing_type => :path. 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| -- cgit v1.2.3