I have a form in rails :
<form class="clearfix" method="GET" action="<%= url_for hotels_path %>">
<input type="text" name="country" />
<input type="text" name="city" />
</form>
And i want on submit a redirect to the url :
/hotels/:country/:city
Where country and city are the values of my fields.
How can i manage this, whithout using javascript?
Thank you
You could do the redirect on server side e.g. like this (untested):