Rails Restful actions Index Put

前端 未结 2 585
日久生厌
日久生厌 2021-01-18 03:50

I have frequently run into the situation where I want to update many records at once - like GMail does with setting many messages \"read\" or \"unread\".

Rails encou

2条回答
  •  北海茫月
    2021-01-18 04:01

    I often add collection-based update_multiple and destroy_multiple actions to an otherwise RESTful controller.

    Check out this Railscast on Updating Through Checkboxes. It should give you a good idea how to approach it, come back and add to this question if you run into troubles!

提交回复
热议问题