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 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -