开发者

Adding url parameters with redirect_to

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜