Justin
Justin

Reputation: 187

JSON api on Ruby on Rails

I'm creating a JavaScript web app. I want to use Ruby on Rails to provide the API to the data in JSON format. I am writing the front-end entirely in JavaScript that will make Ajax calls to the API. This way, I will have a consistent data API when I can write different apps on different platforms.

I'm new to Ruby on Rails and I'm not sure if this is a good approach. If so, could you help me point to a good tutorial to implement the back-end that I just mentioned? If not, please help suggest a good way.

Upvotes: 4

Views: 4446

Answers (2)

James Lever
James Lever

Reputation: 319

I didn't work with it yet, but the Rails-API gem by spastorino might be helpful.

Also there is a Railscast on this, so you might want to check this out as a starting point

Upvotes: 2

Related Questions