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.
精彩评论