Reputation: 5647
I've seen some posts that talk about appending URLs but I haven't really found anything that will help me in my views. I have some links that I would like to append the current URL to add additional parameters.
Is there a standard practice for this in rails?
Upvotes: 0
Views: 600
Reputation: 12397
I prefer url_for(:a => 'test')
or for example users_path(:a => 'test')
.
Upvotes: 1
Reputation: 42865
there are a lot of ways to do this.
params = "?a=test"
url = request.full_path << params
Upvotes: 0