request.url returns me this : http://localhost:3000/page?foo=bar.
Is there a method I can call to get http://localhost:3000/page , or do I have to parse the string to strip get parameters?
request.path should return what you're looking for if you're not concerned about the hostname. Otherwise you might try:
request.path
url_for(:only_path => false, :overwrite_params=>nil)
2.1m questions
2.1m answers
60 comments
57.0k users