Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why RAILS::API instead of something like rabl?


Rails-api is a gem that configures rails in a more lean and mean fashion for API usage, it doesn't handle the json serialization. Mostly rails-api disables a lot of default rails features/middlewares that aren't needed when you're only building an API.

For json serialization you may want to look at Active Model Serializers[0], I found it much easier to work with than rabl, and it's also written by the rails-api group.

[0] https://github.com/rails-api/active_model_serializers


AMS maintainer here, I'm making a big announcement about it soon.

That said, you're correct, AMS <-> RABL is the right comparison, not Rails-API <-> RABL.


Where is this AMS announcement going to be? I'd like to watch, since I use AMS extensively (thanks for the great project!)


It'll be on the rails-api-core mailing list: https://groups.google.com/forum/#!forum/rails-api-core


Hmm. Unless I'm crazy, RABL is a totally different thing for a different purpose. RABL is a tool (as is the analogous JBuilder, the default JSON-rendering-thingy for full-blown Rails) whereas Rails::API is a framework.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: