Rails::API is a subset of a normal Rails application, created for
applications that don't require all functionality that a complete
Rails application provides. It is a bit more lightweight, and
consequently a bit faster than a normal Rails application. The main
example for its usage is in API applications only, where you usually
don't need the entire Rails middleware stack nor template generation.
You can start adding middleware and subframeworks back to Rails-api - but then your turning your lean and mean racecar into a minivan.
A better solution may be to create a separate rails app which serves the HTML pages and has the full rails package.
Asked in February 2016Viewed 2,721 timesVoted 4Answered 1 times