Designing Web Service Using Ruby on Rails - Mapping ActiveRecord Models
- by michaeldelorenzo
I've put together a RoR application and would now like to publish a RESTful web service for interacting with my application.
I'm not sure where to go exactly, I don't want to simply expose my ActiveRecord models since there is some data on each model that isn't needed or shouldn't be exposed via an API like this. I also don't want to create a SOAP solution.
My application is built using Rails 2.3.5 and I hope to move to Rails 3.0 soon after its released.
I'm basically looking for a way to map my ActiveRecord models to "models" that would be exposed via the web service. Is ActiveResource the correct thing to use? What about ActionWebService?