开发者

Adding url parameters with redirect_to

开发者 https://www.devze.com 2022-12-18 23:48 出处:网络
Is it possible to 开发者_如何学Cpass url parameters with this type of redirect_to? redirect_to contact_path(@contact), :show_family => \'yes\'

Is it possible to 开发者_如何学Cpass url parameters with this type of redirect_to?

redirect_to contact_path(@contact), :show_family => 'yes'

I want a URL that results in:

/contacts/1?show_family=yes


Yes, just pass your query string parameters in to contact_path:

redirect_to contact_path(@contact, :show_family => 'yes')
0

精彩评论

暂无评论...
验证码 换一张
取 消