Skip to content

Commit

Permalink
fix rails5 router bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aka47 committed Mar 26, 2023
1 parent bf40115 commit 25008e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wash_out/router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 25008e7

Please sign in to comment.