Skip to content

Commit a049217

Browse files
committed
Only merge params option if params is a Hash in url_for helper
1 parent 2e14c53 commit a049217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionpack/lib/action_dispatch/routing/route_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ def url_for(options, route_name = nil, url_strategy = UNKNOWN, method_name = nil
822822
path = route_with_params.path(method_name)
823823
params = route_with_params.params
824824

825-
if options.key? :params
825+
if options[:params].is_a?(Hash)
826826
params.merge! options[:params]
827827
end
828828

0 commit comments

Comments
 (0)