Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Rails api #19832
[Description extracted from http://wyeworks.com/blog/2015/4/20/rails-api-is-going-to-be-included-in-rails-5/]
A decision was made to incorporate Rails API into Rails core
What Is Rails API?
The original idea behind Rails API was to serve as a starting point for a version of Rails better suited for JS-heavy apps. As of today, Rails API provides: trimmed down controllers and middleware stack together with a matching set of generators, all specifically tailored for API type applications.
We still need to discuss the “Rails way” for API applications, how API apps should be built and, what features we’d like included from our original list of ideas. In particular:
referenced this pull request
Apr 21, 2015
Hey @dhh, thanks for opening the PR.
Some of the things that needs discussions are ...
Agree on keeping assets out of the app. Need to take another (long over
On Tue, Apr 21, 2015 at 5:08 PM, Santiago Pastorino <
FWIW, here are my 2 cents.
I personally would by far prefer ActiveModel Serializers, but as long as we can swap them, I would be fine.
I think, that I would keep the assets generation out of API apps by default, but make it possible. I think most people using Rails as an API are more likely to have a separate setup for their front end, like using Gulp & Grunt or any other cool JS stuff there is.
Whatever the decisions are, I am very happy to see Rails API in Rails 5! Thanks for all the hard work on this (and everything else).
I'd argument for keeping asset compilation/concatenation/etc. out of the API app.
If you are writing a JS app, you'd rather use a JS toolchain to prepare the assets. Also, many JS frameworks come with their own build tools, like EmberJS and Angular 2.0. Furthermore, developers working on the JS app exclusively don't have to install a Ruby AND a JS env, if you provide them an API server for development.
added a commit
this pull request
Jun 11, 2015
@spastorino Awesome! Would you be interested in me writing a PR along the lines of https://groups.google.com/d/topic/rubyonrails-core/K8t4-DZ_DkQ/discussion (as discussed above)?
@seemsindie we've written 2 blog post http://wyeworks.com/blog/2015/6/11/how-to-build-a-rails-5-api-only-and-backbone-application/ & http://wyeworks.com/blog/2015/6/30/how-to-build-a-rails-5-api-only-and-ember-application/ to explain how to use some things about this feature.