I am new to Ruby Rails. I am redirecting my page to /user/locations
using redirect_to user_locations_url
and I want to append a query string like ?code='value'
which makes it like user_locations_url?code='value'
.
How do i use it with redirect_to to pass query string parameters.
Thank you!
你可以做redirect_to user_locations_url(code: 'value')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.