Re:How to Wire Up Ruby on Rails and AngularJS as a Single-Pa...
by weatherlight on Tuesday July 22, 2014 @10:32AM
(#8069153)
Why RAILS::API instead of something like rabl?
[ Parent
| on HN ]
Re:How to Wire Up Ruby on Rails and AngularJS as a Single-Pa...
by mbell on Tuesday July 22, 2014 @10:52AM
(#8069265)
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.
Re:How to Wire Up Ruby on Rails and AngularJS as a Single-Pa...
by steveklabnik on Tuesday July 22, 2014 @11:22AM
(#8069442)
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.
Re:How to Wire Up Ruby on Rails and AngularJS as a Single-Pa...
by JustinAiken on Tuesday July 22, 2014 @12:53PM
(#8069993)
Where is this AMS announcement going to be? I'd like to watch, since I use AMS extensively (thanks for the great project!)
Re:How to Wire Up Ruby on Rails and AngularJS as a Single-Pa...
by steveklabnik on Tuesday July 22, 2014 @02:15PM
(#8070629)
It'll be on the rails-api-core mailing list: https://groups.google.com/forum/#!forum/rails-api-core
Re:How to Wire Up Ruby on Rails and AngularJS as a Single-Pa...
by jasonswett on Tuesday July 22, 2014 @10:37AM
(#8069183)
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.