Rails - Get the current url without the GET parameters -


request.url returns me : http://localhost:3000/page?foo=bar.

is there method can call http://localhost:3000/page , or have parse string strip parameters?

request.path should return you're looking if you're not concerned hostname. otherwise might try:

url_for(:only_path => false, :overwrite_params=>nil) 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -