From 25008e76a93098e1e9fa33c5867b26b4f3cd0ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20A=C3=9Fmann?= Date: Sun, 26 Mar 2023 21:37:39 +0200 Subject: [PATCH] fix rails5 router bug https://github.com/inossidabile/wash_out/issues/271 --- lib/wash_out/router.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wash_out/router.rb b/lib/wash_out/router.rb index 8a93885..8660783 100644 --- a/lib/wash_out/router.rb +++ b/lib/wash_out/router.rb @@ -28,7 +28,7 @@ def self.url(request, controller_name) routes.map(&:optimized_path) elsif routes.first.path.respond_to?(:build_formatter) && !(Rails.version =~ /^4/ ) # Rails 5 # we do NOT want to accidentally end up here for Rails 4.2, therefore we check for Rails version as well - routes.map{|x| x.path.build_formatter.evaluate(nil)} + routes.map{|x| x.path.build_formatter.evaluate({})} else routes.map{|x| x.format({})} # Rails 3.2 end