Rails 5 API mode
You can build a rails API with the --api
mode on Rails 5.
rails _5.0.0.rc1_ new rails5-api --api
Gems removed with api mode:
- coffee-rails
- jquery-rails
- sass-rails
- uglifier
- turbolinks
- jbuilder
Files removed with api mode:
- app/assets
- lib/assets
- vendor/assets
- app/helpers
- app/views/layouts/application.hmtl.erb
ApplicationController
app/controller/application_controller.rb has changed to inherit from ActionController::API
Rack middleware list changed with api mode:
5 middlewares were removed, including Cookies and Flash.
use Rack::MethodOverride
use WebConsole::Middleware
use ActionDispatch::Cookies
use ActionDispatch::Session::CookieStore
use ActionDispatch::Flash
Check their changelog
Tweet