diff options
author | =?utf-8?q?Mislav=20Marohni=C4=87?= <mislav.marohnic@gmail.com> | 2009-06-21 17:53:07 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-06-21 17:53:07 +0100 |
commit | 21cd4c0e93fc6ac5497ada787d286c07f627e5ba (patch) | |
tree | 324c50a76105370b6607b88972a5c804a4557ff5 /actionpack/lib/action_controller/routing/generation | |
parent | 83c1934003740ed01c618a8943457a0df53e2adb (diff) | |
download | rails-21cd4c0e93fc6ac5497ada787d286c07f627e5ba.tar.gz rails-21cd4c0e93fc6ac5497ada787d286c07f627e5ba.tar.bz2 rails-21cd4c0e93fc6ac5497ada787d286c07f627e5ba.zip |
Fix polymorphic_path doesn't modify options hash [#2099 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller/routing/generation')
-rw-r--r-- | actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb | 3 |
1 files changed, 1 insertions, 2 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| |