diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-07 17:19:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-12 15:54:44 -0700 |
commit | 4b8ab797b4653d8764c687e73cb630c32ae8bb4b (patch) | |
tree | 59272a4358bc814dde9b94df2abdb12069c1ffaa /actionview/lib | |
parent | e8210450ad141176efdc29895b835a0e132d14d5 (diff) | |
download | rails-4b8ab797b4653d8764c687e73cb630c32ae8bb4b.tar.gz rails-4b8ab797b4653d8764c687e73cb630c32ae8bb4b.tar.bz2 rails-4b8ab797b4653d8764c687e73cb630c32ae8bb4b.zip |
break each polymorphic type to it's own method
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/routing_url_for.rb | 6 |
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 |