When using the Rails redirect_to with a relative path, how does it determine the domain to combine with the relative path? Is there a method or env that is being used?
CodePudding user response:
When using the Rails redirect_to with a relative path, it determines the domain to combine with the relative path by using the request.host method.
https://guides.rubyonrails.org/v6.1/layouts_and_rendering.html#using-redirect-to