Commit graph

4 commits

Author SHA1 Message Date
Darren Cheng
35abadd8f7 Upgrade codebase to support latest AMS version. 2016-07-14 19:25:58 -07:00
dB
04c21470e3 Implemented RuboCop, Ruby linter. 2015-01-13 18:50:18 -05:00
Radan Skoric
0db4cae3b5 Correctly fetch serialization scope 2014-08-05 10:26:54 +02:00
Zander Hill
a7ce076ec7 [Issue #13] Add render syntactic sugar
As in issue #13 an example solution provided by @jrhe an implementation
of said feature has been created.

As per the discussion in the thread this is only a helper to be able to
reach the available options provided in the active_model_serializer gem.

usage is as follows:

```ruby
get '/some_path' do
  collection = Collection.all
  render collection, { meta: { current_page: 5 }, meta_key:
    :pagination_info }
end
```

The return value would be:
`{ pagination_info: { current_page: 5 }, collection: [item, item] }`

If given without a `meta_key` it would return as:
`{ meta: { current_page: 5 }, collection: [item, item] }`

Any feedback appreciated.

@zph, @olleolleolle and @bjoska
2014-02-09 22:51:17 +00:00