fabrik42/acts_as_api — pull request #88 by javiyu (2013-12-24 15:42:10+00:00)
Title: Fix response for array of plain objects

For an array of plain objects it won't create the choosen root key in the json.

For example:
```
class User
def model_name
'user'
end
end
@user = User.new(first_name: 'Luke', last_name: 'Skywalker')
render_for_api :public, :json => [@user]
```
Previous output:
{"records":[{"record":{"first_name":"Luke","last_name":"Skywalker"}}]}

New output:
{"users":[{"user":{"first_name":"Luke","last_name":"Skywalker"}}]}