josevalim/inherited_resources — pull request #255 by heartsentwined (2013-02-08 10:23:57+00:00)
Title: added params[:ids] = [1, 2, 3] support to collection actions

Adds support for params[:ids] on collection actions, making the following URLs work as expected, while not breaking any existing functionality:

* `/users?ids[]=1&ids[]=2`
* `/users?ids=1`
* `/users`

This is a primitive support for batch API actions, currently I have only written a test for the `index` action, but since the change is in the underlying `collection` action, it should work for anything else that depends on `collection` too.

This pull request was inspired by batch API conventions that are emerging; specifically this was based on [ember.js](http://emberjs.com/)'s REST adapter, which maps a request of loading users with ID 1 and 2 to `GET /users?ids[]=1&ids[]=2`.