开发者

Mass edit in Ruby on Rails

开发者 https://www.devze.com 2023-01-18 15:20 出处:网络
Let\'s say you have some products which have 2 fields, a description and a stock value. How do you layout a form of all the products in an action named mass_edit with fields so a user can edit some,

Let's say you have some products which have 2 fields, a description and a stock value.

How do you layout a form of all the products in an action named mass_edit with fields so a user can edit some, press submit and then save them in a mas开发者_如何学编程s_update?

I have used nested forms in a order-order_line scenario but i can't seem to figure this one out.


The following screencasts can help you to find a solution:

  • http://railscasts.com/episodes/165-edit-multiple
  • http://railscasts.com/episodes/198-edit-multiple-individually
0

精彩评论

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