[LRUG] CMS for bespoke API

Tejas Dinkar tejasdinkar at gmail.com
Tue Sep 10 19:20:50 PDT 2013


On Sep-11-2013, at 7:02 AM, Nick Novitski <nicknovitski at gmail.com> wrote:
> There's also https://github.com/rails-api/active_model_serializers 


+1 on Active Model Serializer.

Benefits:
1) Easily testable, and OO
2) Has access to current_user (or any other controller method via `scope'). This makes it possible for you to serialize based on who has requested the object
3) Works seamlessly with respond_with 
4) If you have the same relation object multiple times on your object (say user can be created_by, updated_by, etc…) then you have a way to just `embed' the user once.

Also, +1 on rails-api gem as well :-)
--
Tejas Dinkar
http://www.nilenso.com
Nilenso Software (formerly C42 Engineering)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20130911/ebb60874/attachment-0003.html>


More information about the Chat mailing list