I am using rails-api
gem for an api project....
I have two or three webpages how do I do it SO that html will make an ajax call and consume JSONS
Where can I keep the html pages and render it..
I am using rails-api
gem for an api project....
I have two or three webpages how do I do it SO that html will make an ajax call and consume JSONS
Where can I keep the html pages and render it..
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.
If they're static pages (with static urls), you can put them in /public. It's generally considered bad practice, but it will work.