开发者

How to pass parameters between New and Create actions?

I have a parameter in my url when linking to the Ne开发者_StackOverflow社区w action. I need this parameter in the create action. How do you do it?


You may use a hidden field.

<input id="thing" type="hidden" value="<%= params[:thing] %>" />

Put that code in the new view.


I've found that <input type="hidden" name="modal" value="true" /> also works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜