diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/polymorphic_routes.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb index c8baf7a324..d8108e5534 100644 --- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb @@ -111,12 +111,11 @@ module ActionDispatch if record_or_hash_or_array.first.is_a?(ActionDispatch::Routing::RoutesProxy) recipient = record_or_hash_or_array.shift end + args = record_or_hash_or_array.dup + else + args = [record_or_hash_or_array] end - args = Array === record_or_hash_or_array ? - record_or_hash_or_array.dup : - [ record_or_hash_or_array ] - record_list = extract_record_list(record_or_hash_or_array) record = convert_to_model(record_list.pop) |