문제

I can't seem to find an answer to what should be simple. I'm using Serve, which runs on a WEBRick server. I'd like to be able to grab the current page's URL. How would I do that?

도움이 되었습니까?

해결책

Since Serve uses Rack under the hood, try this in a view:

<%= request.url %>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top