From 4b8ab797b4653d8764c687e73cb630c32ae8bb4b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 7 May 2014 17:19:27 -0700 Subject: break each polymorphic type to it's own method --- actionview/lib/action_view/routing_url_for.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionview/lib/action_view') diff --git a/actionview/lib/action_view/routing_url_for.rb b/actionview/lib/action_view/routing_url_for.rb index b9e4b590e7..782f1865d6 100644 --- a/actionview/lib/action_view/routing_url_for.rb +++ b/actionview/lib/action_view/routing_url_for.rb @@ -85,8 +85,12 @@ module ActionView _back_url when Array polymorphic_path(options, options.extract_options!) + when Class + method = class_path_helper_call options + send method else - polymorphic_path(options) + method, args = model_path_helper_call options + send(method, *args) end end -- cgit v1.2.3