aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/routing_url_for.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/routing_url_for.rb')
-rw-r--r--actionview/lib/action_view/routing_url_for.rb6
1 files changed, 5 insertions, 1 deletions
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