开发者

Rails posting form data

I was looking at some tutorials on rai开发者_StackOverflowls and found that people use a separate create function for saving form data. When i tried the same i was unable to repopulate the form, that is shown in the index.html.erb and is rendered by the index function. should i add a manual render command?


  1. Set a member variable (e.g.) @elems to contain data
  2. In your view index.html.erb test for emptiness
  3. If not empty, populate form elements with @elems .
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜