chore: ensure trailing slash

This commit is contained in:
gabrieljablonski 2025-04-02 00:31:43 -03:00
parent 0348d0b25a
commit 3325539edf

View File

@ -2,6 +2,7 @@ module FrontendUrlsHelper
def frontend_url(path, **query_params)
url_params = query_params.blank? ? '' : "?#{query_params.to_query}"
host = ENV.fetch('FRONTEND_URL_EXTERNAL', root_url)
host = "#{host}/" unless host.end_with?('/')
"#{host}app/#{path}#{url_params}"
end
end