josevalim/active_model_serializers — pull request #54 by twinturbo (2012-05-01 01:14:53+00:00)
Title: ArraySerializer will include pagination if it can

This PR adds pagination information for collections. If the collection has some pagination methods, then include them in a meta object.

```ruby
{
:meta => {:pagination => {:total => 5, :current => 1 }},
:posts => [...]
}
```

I decided to root with a meta key because this leaves room for other meta information in the future (maybe URLS). @wycats also mentioned he was considering this strategy so I figured this was a good bet.